From 0c3733c652a941ea49dcb2248dc06735655e206d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 28 Sep 2006 09:41:20 +0000 Subject: [PATCH] gst/playback/gstplaybin.c: Only remove visualisation from visbin if there is a visbin (or: don't throw warnings when ... Original commit message from CVS: * gst/playback/gstplaybin.c: (remove_sinks): Only remove visualisation from visbin if there is a visbin (or: don't throw warnings when closing totem without playing a file). --- ChangeLog | 6 ++++++ gst/playback/gstplaybin.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92846166d0..eaab27f738 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-28 Tim-Philipp Müller + + * gst/playback/gstplaybin.c: (remove_sinks): + Only remove visualisation from visbin if there is a visbin (or: + don't throw warnings when closing totem without playing a file). + 2006-09-27 Wim Taymans * gst-libs/gst/audio/gstbaseaudiosink.c: diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index d03a4e4ee4..027448ab66 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -1311,9 +1311,11 @@ remove_sinks (GstPlayBin * play_bin) GST_ELEMENT_CAST (gst_element_get_parent (play_bin->visualisation)); gst_element_set_state (play_bin->visualisation, GST_STATE_NULL); - gst_bin_remove (GST_BIN_CAST (vis_bin), play_bin->visualisation); - gst_object_unref (vis_bin); + if (vis_bin) { + gst_bin_remove (GST_BIN_CAST (vis_bin), play_bin->visualisation); + gst_object_unref (vis_bin); + } } if (play_bin->frame) {