forked from enlightenment/efl
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
This commit is contained in:
parent
25bc0b9785
commit
16f4c5c35a
|
@ -871,14 +871,14 @@ _native_cb_bind(void *image)
|
||||||
}
|
}
|
||||||
else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL)
|
else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL)
|
||||||
{
|
{
|
||||||
if (n->ns_data.evasgl.surface)
|
if (n->ns_data.evasgl.surface && glsym_evgl_native_surface_buffer_get)
|
||||||
{
|
{
|
||||||
Eina_Bool is_egl_image = EINA_FALSE;
|
Eina_Bool is_egl_image = EINA_FALSE;
|
||||||
void *surface;
|
void *surface;
|
||||||
|
|
||||||
if (glsym_evgl_native_surface_buffer_get)
|
surface =
|
||||||
surface = glsym_evgl_native_surface_buffer_get(n->ns_data.evasgl.surface, &is_egl_image);
|
glsym_evgl_native_surface_buffer_get(n->ns_data.evasgl.surface,
|
||||||
|
&is_egl_image);
|
||||||
if (is_egl_image)
|
if (is_egl_image)
|
||||||
{
|
{
|
||||||
if (glsym_glEGLImageTargetTexture2DOES)
|
if (glsym_glEGLImageTargetTexture2DOES)
|
||||||
|
|
Loading…
Reference in New Issue