summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-05 10:35:18 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-05 10:49:30 -0400
commitfa66ce28ec4c7fba739d075535868d584cc0b658 (patch)
tree6d6c0e3a83ab3b78c4b6a31c816156631e8b5b8e
parent6f4f0100d2ebea6d83edab9b4c90a06c98aaf84a (diff)
ecore-wl2: null out subsurface pointers after destroying them
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_subsurf.c12
1 files 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 b18c9f3387..980c2eed47 100644
--- a/src/lib/ecore_wl2/ecore_wl2_subsurf.c
+++ b/src/lib/ecore_wl2/ecore_wl2_subsurf.c
@@ -5,12 +5,20 @@
5#include "ecore_wl2_private.h" 5#include "ecore_wl2_private.h"
6 6
7void 7void
8_ecore_wl2_subsurf_unmap(Ecore_Wl2_Subsurface *subsurf)
9{
10 if (subsurf->wl.subsurface) wl_subsurface_destroy(subsurf->wl.subsurface);
11 if (subsurf->wl.surface) wl_surface_destroy(subsurf->wl.surface);
12 subsurf->wl.subsurface = NULL;
13 subsurf->wl.surface = NULL;
14}
15
16void
8_ecore_wl2_subsurf_free(Ecore_Wl2_Subsurface *subsurf) 17_ecore_wl2_subsurf_free(Ecore_Wl2_Subsurface *subsurf)
9{ 18{
10 Ecore_Wl2_Window *parent; 19 Ecore_Wl2_Window *parent;
11 20
12 if (subsurf->wl.subsurface) wl_subsurface_destroy(subsurf->wl.subsurface); 21 _ecore_wl2_subsurf_unmap(subsurf);
13 if (subsurf->wl.surface) wl_surface_destroy(subsurf->wl.surface);
14 22
15 parent = subsurf->parent; 23 parent = subsurf->parent;
16 if (parent) 24 if (parent)