diff --git a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c index 18d29d398e..f8f77e21fa 100644 --- a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c +++ b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c @@ -244,6 +244,7 @@ window_destroy_cb (GtkWidget * widget, GstGtkWaylandSink * self) gst_gtk_wayland_sink_get_instance_private (self); GST_OBJECT_LOCK (self); + g_clear_object (&priv->wl_window); priv->gtk_window = NULL; GST_OBJECT_UNLOCK (self); @@ -651,6 +652,7 @@ gst_gtk_wayland_sink_stop_on_main (GstGtkWaylandSink * self) g_signal_handler_disconnect (priv->gtk_window, priv->gtk_window_destroy_id); priv->gtk_window_destroy_id = 0; + g_clear_object (&priv->wl_window); gtk_widget_destroy (priv->gtk_window); priv->gtk_window = NULL; }