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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user