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