From: Matthias Clasen Date: Sat, 16 May 2020 17:47:18 +0000 (-0400) Subject: broadway: Be careful about destroyed surfaces X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~17^2~28^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=77107f70c4fb0751653fe20a8d3de0195ff53fcc;p=gtk4.git broadway: Be careful about destroyed surfaces Just because we take a ref on a surface does not guarantee that it is still usable a second later. Check if its been destroyed in the meantime. This is breaking the template tests in ci, since there is no client behind the Broadway server. --- diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index 1b85f29825..ac91d2887f 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -99,7 +99,8 @@ gdk_broadway_surface_finalize (GObject *object) static gboolean thaw_updates_cb (GdkSurface *surface) { - gdk_surface_thaw_updates (surface); + if (!GDK_SURFACE_DESTROYED (surface)) + gdk_surface_thaw_updates (surface); g_object_unref (surface); return G_SOURCE_REMOVE; }