From da80e6167e225e43e6bbc234d3674aac3659c660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 18 Jan 2006 18:56:44 +0000 Subject: [PATCH] gst/gstbin.c: Guard gst_object_unref call against a NULL object (dispose can theoretically be called multiple times). Original commit message from CVS: * gst/gstbin.c: (gst_bin_dispose): Guard gst_object_unref call against a NULL object (dispose can theoretically be called multiple times). --- ChangeLog | 6 ++++++ gst/gstbin.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4c6c6edde..8c810d368a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-18 Tim-Philipp Müller + + * gst/gstbin.c: (gst_bin_dispose): + Guard gst_object_unref call against a NULL object (dispose + can theoretically be called multiple times). + 2006-01-18 Wim Taymans * gst/gstbin.c: (gst_bin_element_set_state): diff --git a/gst/gstbin.c b/gst/gstbin.c index b4c56ec114..b3ac583deb 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -381,8 +381,8 @@ gst_bin_dispose (GObject * object) GST_CAT_DEBUG_OBJECT (GST_CAT_REFCOUNTING, object, "dispose"); bin_remove_messages (bin, NULL, GST_MESSAGE_ANY); - gst_object_unref (bin->child_bus); - bin->child_bus = NULL; + + gst_object_replace ((GstObject **) & bin->child_bus, NULL); gst_object_replace ((GstObject **) & bin->provided_clock, NULL); while (bin->children) {