playsink: avoid g_object_set() on NULL pointers

There may not be an overlay element if a text-sink is set.

Fixes #611702.
This commit is contained in:
Josep Torra Valles 2010-03-03 20:15:44 +00:00 committed by Tim-Philipp Müller
parent 6eef04c1cb
commit 25fc69e6aa

View file

@ -1935,8 +1935,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
}
if (playsink->textchain) {
GST_DEBUG_OBJECT (playsink, "adding text chain");
g_object_set (G_OBJECT (playsink->textchain->overlay), "silent", FALSE,
NULL);
if (playsink->textchain->overlay != NULL)
g_object_set (playsink->textchain->overlay, "silent", FALSE, NULL);
add_chain (GST_PLAY_CHAIN (playsink->textchain), TRUE);
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad),