discomfitor pushed a commit to branch master.

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

commit fa66ce28ec4c7fba739d075535868d584cc0b658
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu May 5 10:35:18 2016 -0400

    ecore-wl2: null out subsurface pointers after destroying them
---
 src/lib/ecore_wl2/ecore_wl2_subsurf.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_subsurf.c 
b/src/lib/ecore_wl2/ecore_wl2_subsurf.c
index b18c9f3..980c2ee 100644
--- a/src/lib/ecore_wl2/ecore_wl2_subsurf.c
+++ b/src/lib/ecore_wl2/ecore_wl2_subsurf.c
@@ -5,12 +5,20 @@
 #include "ecore_wl2_private.h"
 
 void
+_ecore_wl2_subsurf_unmap(Ecore_Wl2_Subsurface *subsurf)
+{
+   if (subsurf->wl.subsurface) wl_subsurface_destroy(subsurf->wl.subsurface);
+   if (subsurf->wl.surface) wl_surface_destroy(subsurf->wl.surface);
+   subsurf->wl.subsurface = NULL;
+   subsurf->wl.surface = NULL;
+}
+
+void
 _ecore_wl2_subsurf_free(Ecore_Wl2_Subsurface *subsurf)
 {
    Ecore_Wl2_Window *parent;
 
-   if (subsurf->wl.subsurface) wl_subsurface_destroy(subsurf->wl.subsurface);
-   if (subsurf->wl.surface) wl_surface_destroy(subsurf->wl.surface);
+   _ecore_wl2_subsurf_unmap(subsurf);
 
    parent = subsurf->parent;
    if (parent)

-- 


Reply via email to