From: Colin Kinloch Date: Mon, 20 Mar 2023 17:44:23 +0000 (+0000) Subject: gtkwaylandsink: Fix crash when rendering after the window is closed X-Git-Tag: 1.22.7~399 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fcd34bf2296b554e22d1158b0873698e9b5842b;p=platform%2Fupstream%2Fgstreamer.git gtkwaylandsink: Fix crash when rendering after the window is closed Continuation of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4197 Part-of: --- diff --git a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c index e4dd06e..44f93db 100644 --- a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c +++ b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c @@ -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);