winsys: glx: fix crash when inspecting onscreens
An unallocated onscreen might have a NULL winsys field. https://bugzilla.gnome.org/show_bug.cgi?id=754888
This commit is contained in:
parent
4cb750928e
commit
00ea695ce2
@ -180,7 +180,7 @@ find_onscreen_for_xid (CoglContext *context, uint32_t xid)
|
|||||||
|
|
||||||
/* Does the GLXEvent have the GLXDrawable or the X Window? */
|
/* Does the GLXEvent have the GLXDrawable or the X Window? */
|
||||||
xlib_onscreen = COGL_ONSCREEN (framebuffer)->winsys;
|
xlib_onscreen = COGL_ONSCREEN (framebuffer)->winsys;
|
||||||
if (xlib_onscreen->xwin == (Window)xid)
|
if (xlib_onscreen != NULL && xlib_onscreen->xwin == (Window)xid)
|
||||||
return COGL_ONSCREEN (framebuffer);
|
return COGL_ONSCREEN (framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user