mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
macos: check for destroyed surfaces in vfuncs
This commit is contained in:
parent
b7130a1ce3
commit
8a4fd3f2af
@ -190,6 +190,9 @@ gdk_macos_surface_end_frame (GdkMacosSurface *self)
|
||||
|
||||
g_assert (GDK_IS_MACOS_SURFACE (self));
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (self))
|
||||
return;
|
||||
|
||||
display = gdk_surface_get_display (GDK_SURFACE (self));
|
||||
frame_clock = gdk_surface_get_frame_clock (GDK_SURFACE (self));
|
||||
|
||||
@ -208,10 +211,11 @@ gdk_macos_surface_before_paint (GdkMacosSurface *self,
|
||||
g_assert (GDK_IS_MACOS_SURFACE (self));
|
||||
g_assert (GDK_IS_FRAME_CLOCK (frame_clock));
|
||||
|
||||
if (surface->update_freeze_count > 0)
|
||||
if (GDK_SURFACE_DESTROYED (self))
|
||||
return;
|
||||
|
||||
gdk_macos_surface_begin_frame (self);
|
||||
if (surface->update_freeze_count == 0)
|
||||
gdk_macos_surface_begin_frame (self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -223,10 +227,11 @@ gdk_macos_surface_after_paint (GdkMacosSurface *self,
|
||||
g_assert (GDK_IS_MACOS_SURFACE (self));
|
||||
g_assert (GDK_IS_FRAME_CLOCK (frame_clock));
|
||||
|
||||
if (surface->update_freeze_count > 0)
|
||||
if (GDK_SURFACE_DESTROYED (self))
|
||||
return;
|
||||
|
||||
gdk_macos_surface_end_frame (self);
|
||||
if (surface->update_freeze_count == 0)
|
||||
gdk_macos_surface_end_frame (self);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user