mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
glx: add a missing nullptr check
This caused GLX applications to segfault under zink. This technically also fixes cleanup when any driver fails init Signed-off-by: Sid Pranjale <mail@sidonthe.net> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31072>
This commit is contained in:
parent
c20552678a
commit
27c09eacb7
1 changed files with 4 additions and 1 deletions
|
|
@ -739,7 +739,10 @@ glx_screen_cleanup(struct glx_screen *psc)
|
|||
psc->visuals = NULL; /* NOTE: just for paranoia */
|
||||
}
|
||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
driDestroyConfigs(psc->driver_configs);
|
||||
if (psc->driver_configs) {
|
||||
driDestroyConfigs(psc->driver_configs);
|
||||
psc->driver_configs = NULL;
|
||||
}
|
||||
/* Free the direct rendering per screen data */
|
||||
driDestroyScreen(psc->frontend_screen);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue