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
This commit is contained in:
Xavier Claessens 2015-06-16 16:21:26 -04:00 committed by Matthew Waters
parent cb10f1b290
commit c55e55f48b

View file

@ -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 (&gtk_sink->widget);
G_OBJECT_CLASS (parent_class)->finalize (object);
}