summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-16 18:37:15 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-16 18:38:25 -0500
commit17b0db9ed39e6a203c93a5b44760c7eb72087186 (patch)
tree01a5b6a7793822025c3de5850b70ce4688b769d7 /src/lib/efl_wl
parent5b64079ee9db4accfaed82e0da64106a6d99468a (diff)
efl-wl: add lots of null checks to egl init
ref T6617
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/efl_wl.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 40667cabf9..814e3cbe2f 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -3985,10 +3985,12 @@ seat_destroy(Comp_Seat *s)
3985static void 3985static void
3986comp_gl_shutdown(Comp *c) 3986comp_gl_shutdown(Comp *c)
3987{ 3987{
3988 if (c->glapi->evasglUnbindWaylandDisplay) 3988 if (c->glapi && c->glapi->evasglUnbindWaylandDisplay)
3989 c->glapi->evasglUnbindWaylandDisplay(c->gl, c->display); 3989 c->glapi->evasglUnbindWaylandDisplay(c->gl, c->display);
3990 evas_gl_surface_destroy(c->gl, c->glsfc); 3990 if (c->glsfc)
3991 evas_gl_context_destroy(c->gl, c->glctx); 3991 evas_gl_surface_destroy(c->gl, c->glsfc);
3992 if (c->glctx)
3993 evas_gl_context_destroy(c->gl, c->glctx);
3992 evas_gl_free(c->gl); 3994 evas_gl_free(c->gl);
3993 evas_gl_config_free(c->glcfg); 3995 evas_gl_config_free(c->glcfg);
3994 c->glsfc = NULL; 3996 c->glsfc = NULL;
@@ -4001,13 +4003,18 @@ static void
4001comp_gl_init(Comp *c) 4003comp_gl_init(Comp *c)
4002{ 4004{
4003 c->glctx = evas_gl_context_create(c->gl, NULL); 4005 c->glctx = evas_gl_context_create(c->gl, NULL);
4006 if (!c->glctx) goto end;
4004 c->glcfg = evas_gl_config_new(); 4007 c->glcfg = evas_gl_config_new();
4008 if (!c->glcfg) goto end;
4005 c->glsfc = evas_gl_surface_create(c->gl, c->glcfg, 1, 1); 4009 c->glsfc = evas_gl_surface_create(c->gl, c->glcfg, 1, 1);
4006 evas_gl_make_current(c->gl, c->glsfc, c->glctx); 4010 if (!c->glsfc) goto end;
4011 if (!evas_gl_make_current(c->gl, c->glsfc, c->glctx)) goto end;
4007 c->glapi = evas_gl_context_api_get(c->gl, c->glctx); 4012 c->glapi = evas_gl_context_api_get(c->gl, c->glctx);
4008 if ((!c->glapi->evasglBindWaylandDisplay) || 4013 if (c->glapi->evasglBindWaylandDisplay &&
4009 (!c->glapi->evasglBindWaylandDisplay(c->gl, c->display))) 4014 c->glapi->evasglBindWaylandDisplay(c->gl, c->display))
4010 comp_gl_shutdown(c); 4015 return;
4016end:
4017 comp_gl_shutdown(c);
4011} 4018}
4012 4019
4013static void 4020static void