subsurface: Avoid a crash
When finalizing a subsurface, we need to make sure it is removed from the sibling lists in its parent, or bad things will happen. This should crashes seen in Epiphany nightly. Fixes: #6891
This commit is contained in:
@@ -29,11 +29,14 @@ gdk_subsurface_init (GdkSubsurface *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void remove_subsurface (GdkSubsurface *subsurface);
|
||||
|
||||
static void
|
||||
gdk_subsurface_finalize (GObject *object)
|
||||
{
|
||||
GdkSubsurface *subsurface = GDK_SUBSURFACE (object);
|
||||
|
||||
remove_subsurface (subsurface);
|
||||
g_ptr_array_remove (subsurface->parent->subsurfaces, subsurface);
|
||||
g_clear_object (&subsurface->parent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user