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

Robert Bragg robert at sixbynine.org
Fri Jun 21 04:40:14 PDT 2013


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Wed, Jun 19, 2013 at 1:37 PM, Neil Roberts <neil at linux.intel.com> wrote:
> 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.
> ---
>  cogl/winsys/cogl-winsys-egl-x11.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list