diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2015-09-11 17:29:15 +0200 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2015-09-11 17:34:39 +0200 |
commit | 00ea695ce26a23e84cd6e7a425be4f0d2221f7f2 (patch) | |
tree | 72fec3f4ace9671a0a0217c51c461adcb3d61dc7 | |
parent | 4cb750928e97be859bfd48ef01e38caee60402b9 (diff) | |
download | cogl-00ea695ce26a23e84cd6e7a425be4f0d2221f7f2.tar.gz |
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
-rw-r--r-- | cogl/winsys/cogl-winsys-glx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index 44138732..72d9e562 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/winsys/cogl-winsys-glx.c @@ -180,7 +180,7 @@ find_onscreen_for_xid (CoglContext *context, uint32_t xid) /* Does the GLXEvent have the GLXDrawable or the X Window? */ 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); } |