gst/gstelement.c: Don't crash printing the warning if the pad has no parent.
Original commit message from CVS:
* gst/gstelement.c: (gst_element_remove_pad):
Don't crash printing the warning if the pad has no parent.
diff --git a/ChangeLog b/ChangeLog
index cf1b93e..a8fbade 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-04 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/gstelement.c: (gst_element_remove_pad):
+ Don't crash printing the warning if the pad has no parent.
+
2006-08-02 Wim Taymans <wim@fluendo.com>
* libs/gst/dataprotocol/dataprotocol.c:
diff --git a/gst/gstelement.c b/gst/gstelement.c
index 5fe258e..42a3b7c 100644
--- a/gst/gstelement.c
+++ b/gst/gstelement.c
@@ -746,8 +746,7 @@
/* FIXME, locking order? */
GST_OBJECT_LOCK (element);
g_critical ("Padname %s:%s does not belong to element %s when removing",
- GST_ELEMENT_NAME (GST_PAD_PARENT (pad)), GST_PAD_NAME (pad),
- GST_ELEMENT_NAME (element));
+ GST_DEBUG_PAD_NAME (pad), GST_ELEMENT_NAME (element));
GST_OBJECT_UNLOCK (element);
GST_OBJECT_UNLOCK (pad);
return FALSE;