[PATCH] compositor: add safety check when EGL fails to initialize

Kristian Høgsberg krh at bitplanet.net
Tue Nov 9 17:48:53 PST 2010


On Tue, Nov 9, 2010 at 7:42 PM, Tiago Vignatti <tiago.vignatti at nokia.com> wrote:
> offending message:
>
>    Program received signal SIGSEGV, Segmentation fault.
>    create_pointer_images (ec=0x619f10) at compositor.c:240
>    240         glEGLImageTargetTexture2DOES(GL_TEXTURE_2D,
>
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
> Hello,
>
> This trivial patch is to celebrate and earn the amount of time I spent to make
> this all work on my system. So: nouveau + gallium + egl + wayland under xorg =
> victory \o/

Very nice, patch applied.

Kristian

>  compositor/compositor-x11.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/compositor/compositor-x11.c b/compositor/compositor-x11.c
> index f55b30e..5178873 100644
> --- a/compositor/compositor-x11.c
> +++ b/compositor/compositor-x11.c
> @@ -659,7 +659,8 @@ x11_compositor_create(struct wl_display *display, int width, int height)
>        x11_compositor_get_resources(c);
>
>        c->base.wl_display = display;
> -       x11_compositor_init_egl(c);
> +       if (x11_compositor_init_egl(c) < 0)
> +        return NULL;
>
>        /* Can't init base class until we have a current egl context */
>        if (wlsc_compositor_init(&c->base, display) < 0)
> --
> 1.7.0.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list