st/xorg: Check that ms->api->destroy is not NULL before calling it.
Fixes potential crash on X server shutdown.
This commit is contained in:
parent
0b466c8705
commit
e32a341be6
|
@ -726,8 +726,10 @@ CloseScreen(int scrnIndex, ScreenPtr pScreen)
|
|||
if (ms->exa)
|
||||
xorg_exa_close(pScrn);
|
||||
|
||||
if (ms->api->destroy)
|
||||
ms->api->destroy(ms->api);
|
||||
ms->api = NULL;
|
||||
ms->api = NULL;
|
||||
|
||||
drmClose(ms->fd);
|
||||
ms->fd = -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue