From ebfd6acde102c84f625f9e51d52fb9a4becaa011 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 28 Jun 2011 19:03:23 +0200 Subject: [PATCH] playsink: only unset initialized GValue --- gst/playback/gstplaysink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index cf6a0c15f3..028305122f 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -991,10 +991,11 @@ gst_play_sink_find_property_sinks (GstPlaySink * playsink, GstElement * obj, found = gst_iterator_find_custom (it, (GCompareFunc) find_property, &item, &helper); gst_iterator_free (it); - if (found) + if (found) { result = g_value_get_object (&item); - /* we don't need the extra ref */ - g_value_unset (&item); + /* we don't need the extra ref */ + g_value_unset (&item); + } } return result; }