[cogl/cogl-1.16] egl-x11: Fix a crash when the app has non-Cogl windows



commit 1455561a202002479f097ea88e0c93a2504c29b2
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>
    
    (cherry picked from commit a0056df61903d74180d4e4caa1046e68396d1be0)

 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 ba6f500..f5f7bc2 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]