raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=724b1aa560e962d5750c13f37ac8077164e467c2

commit 724b1aa560e962d5750c13f37ac8077164e467c2
Author: Carsten Haitzler <ras...@rasterman.com>
Date:   Sun Sep 5 00:35:24 2021 +0100

    evas - gl - ensure surfaces are 0 when destroyed
    
    easier on debugging when we know that we destroyed them already
---
 src/modules/evas/engines/gl_x11/evas_engine.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 580921ff01..34316a7556 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1965,7 +1965,6 @@ _native_bind_cb(void *image)
                                                           NULL);
                  if (!n->ns_data.x11.surface)
                    WRN("eglCreateImage() for Pixmap 0x%#lx failed: %#x", 
n->ns_data.x11.pixmap, eglGetError());
-
               }
             if (glsym_glEGLImageTargetTexture2DOES)
               {
@@ -2119,6 +2118,7 @@ _native_free_cb(void *image)
               {
                  glsym_evas_gl_common_eglDestroyImage(im->native.disp,
                                                       n->ns_data.x11.surface);
+                 n->ns_data.x11.surface = 0;
                  if ((err = eglGetError()) != EGL_SUCCESS)
                    {
                       ERR("eglDestroyImage() failed.");
@@ -2170,6 +2170,7 @@ _native_free_cb(void *image)
               {
                  glsym_evas_gl_common_eglDestroyImage(im->native.disp,
                                                       n->ns_data.tbm.surface);
+                 n->ns_data.tbm.surface = 0;
                  if ((err = eglGetError()) != EGL_SUCCESS)
                    {
                       ERR("eglDestroyImage() failed.");
@@ -2197,6 +2198,7 @@ _native_free_cb(void *image)
                {
                   glsym_evas_gl_common_eglDestroyImage(im->native.disp,
                                                        
n->ns_data.wl_surface.surface);
+                  n->ns_data.wl_surface.surface = 0;
                   if (eglGetError() != EGL_SUCCESS)
                     ERR("eglDestroyImage() failed.");
                }

-- 


Reply via email to