mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
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
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue