forked from enlightenment/efl
ecore-wl2: null out subsurface pointers after destroying them
This commit is contained in:
parent
6f4f0100d2
commit
fa66ce28ec
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue