summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Jacobs <benj@spam.thsi.be>2016-06-09 09:31:40 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-06-09 09:33:16 -0400
commit16f4c5c35aa102d2af699ab01b0c754dbae15eb1 (patch)
treef825dfee6ed982c16b207f2aff34c3c1bdc93381
parent25bc0b978578482e5376937b4108db3cdd60f72b (diff)
evas-wayland-egl: Make sure surface pointer is valid before using it
Summary: Prevents the uninitialized surface pointer to be used when glsym_evgl_native_surface_buffer_get is NULL. Reviewers: devilhorns Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4016 @fix
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 1252e91442..c35c6ddad0 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -871,14 +871,14 @@ _native_cb_bind(void *image)
871 } 871 }
872 else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL) 872 else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL)
873 { 873 {
874 if (n->ns_data.evasgl.surface) 874 if (n->ns_data.evasgl.surface && glsym_evgl_native_surface_buffer_get)
875 { 875 {
876 Eina_Bool is_egl_image = EINA_FALSE; 876 Eina_Bool is_egl_image = EINA_FALSE;
877 void *surface; 877 void *surface;
878 878
879 if (glsym_evgl_native_surface_buffer_get) 879 surface =
880 surface = glsym_evgl_native_surface_buffer_get(n->ns_data.evasgl.surface, &is_egl_image); 880 glsym_evgl_native_surface_buffer_get(n->ns_data.evasgl.surface,
881 881 &is_egl_image);
882 if (is_egl_image) 882 if (is_egl_image)
883 { 883 {
884 if (glsym_glEGLImageTargetTexture2DOES) 884 if (glsym_glEGLImageTargetTexture2DOES)