diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-11-10 02:42:35 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-11-09 20:47:04 -0500 |
commit | 997ce64302482ba9958cbe784b44c548e42724ac (patch) | |
tree | 7c29984e9ac20198415ced2cc09df4e1882b30dd | |
parent | f2912fa85fc3e0bba3359032f94495dc0a77020b (diff) |
compositor: add safety check when EGL fails to initialize
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@nokia.com>
-rw-r--r-- | 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) |