glx: Fix segfault when Nvidia PRIME render offload is enabled, but not used
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11719 Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37342>
This commit is contained in:
@@ -123,6 +123,10 @@ glxSendClientInfo(struct glx_display *glx_dpy, int screen)
|
||||
for (i = 0; i < ScreenCount(glx_dpy->dpy); i++) {
|
||||
struct glx_screen *src = glx_dpy->screens[i];
|
||||
|
||||
if (src == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char *haystack = src->serverGLXexts;
|
||||
while (haystack != NULL) {
|
||||
char *match = strstr(haystack, "GLX_ARB_create_context");
|
||||
|
||||
Reference in New Issue
Block a user