egl-x11: Fix a crash when the app has non-Cogl windows
The handler for ConfigureNotify events in the EGL X11 winsys was incorrectly trying dereference the onscreen pointer even if it didn't find an onscreen for the X window that has resized. This meant that if the application has other windows that weren't created by Cogl then it would crash when handling events for them. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit a0056df61903d74180d4e4caa1046e68396d1be0)
This commit is contained in:
parent
b32d135299
commit
1455561a20
@ -136,8 +136,8 @@ notify_resize (CoglContext *context,
|
||||
CoglRenderer *renderer = context->display->renderer;
|
||||
CoglRendererEGL *egl_renderer = renderer->winsys;
|
||||
CoglOnscreen *onscreen = find_onscreen_for_xid (context, drawable);
|
||||
CoglOnscreenEGL *egl_onscreen = onscreen->winsys;
|
||||
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
|
||||
CoglOnscreenEGL *egl_onscreen;
|
||||
|
||||
if (!onscreen)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user