From: Mike Blumenkrantz Date: Thu, 5 May 2016 14:35:18 +0000 (-0400) Subject: ecore-wl2: null out subsurface pointers after destroying them X-Git-Tag: upstream/1.20.0~6488 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa66ce28ec4c7fba739d075535868d584cc0b658;p=platform%2Fupstream%2Fefl.git ecore-wl2: null out subsurface pointers after destroying them --- 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)