[cogl] egl-x11: Fix a crash when the app has non-Cogl windows
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] egl-x11: Fix a crash when the app has non-Cogl windows
- Date: Fri, 21 Jun 2013 13:11:14 +0000 (UTC)
commit a0056df61903d74180d4e4caa1046e68396d1be0
Author: Neil Roberts <neil linux intel com>
Date: Wed Jun 19 13:33:57 2013 +0100
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>
cogl/winsys/cogl-winsys-egl-x11.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl-x11.c b/cogl/winsys/cogl-winsys-egl-x11.c
index 24e45bf..b047db4 100644
--- a/cogl/winsys/cogl-winsys-egl-x11.c
+++ b/cogl/winsys/cogl-winsys-egl-x11.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]