ecore-wl2: null out subsurface pointers after destroying them

This commit is contained in:
Mike Blumenkrantz 2016-05-05 10:35:18 -04:00
parent 6f4f0100d2
commit fa66ce28ec
1 changed files with 10 additions and 2 deletions

View File

@ -4,13 +4,21 @@
#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)