gtkwaylandsink: Fix crash when rendering after the window is closed
authorColin Kinloch <colin.kinloch@collabora.com>
Mon, 20 Mar 2023 17:44:23 +0000 (17:44 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 21 Mar 2023 16:04:23 +0000 (16:04 +0000)
Continuation of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4197

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4238>

subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c

index e4dd06e..44f93db 100644 (file)
@@ -961,6 +961,9 @@ render_last_buffer (GstGtkWaylandSink * self, gboolean redraw)
   struct wl_surface *surface;
   struct wl_callback *callback;
 
+  if (!priv->wl_window)
+    return;
+
   wlbuffer = gst_buffer_get_wl_buffer (priv->display, priv->last_buffer);
   surface = gst_wl_window_get_wl_surface (priv->wl_window);