From 72b48a39d809115df6c9465081f983c874fd4025 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 16 Jun 2015 16:21:26 -0400 Subject: [PATCH] GstGtkGLSink: fix possible warning in finalize If the element is finalized before going in READY state the widget could still be NULL. https://bugzilla.gnome.org/show_bug.cgi?id=751104 --- ext/gtk/gstgtkglsink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gtk/gstgtkglsink.c b/ext/gtk/gstgtkglsink.c index 2a77aec350..cee44ba6a2 100644 --- a/ext/gtk/gstgtkglsink.c +++ b/ext/gtk/gstgtkglsink.c @@ -156,7 +156,7 @@ gst_gtk_gl_sink_finalize (GObject * object) { GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object);; - g_object_unref (gtk_sink->widget); + g_clear_object (>k_sink->widget); G_OBJECT_CLASS (parent_class)->finalize (object); }