diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-16 13:47:18 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-16 13:47:18 -0400 |
commit | 77107f70c4fb0751653fe20a8d3de0195ff53fcc (patch) | |
tree | 94be366b6938744fecb853a8c3944a2ddfbaf250 /gdk/broadway | |
parent | b41aeabbeca3e382f661a655650049525b3f41f2 (diff) | |
download | gtk+-77107f70c4fb0751653fe20a8d3de0195ff53fcc.tar.gz |
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.
Diffstat (limited to 'gdk/broadway')
-rw-r--r-- | gdk/broadway/gdksurface-broadway.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |