From ca709618f9b9fbf8b33ee7a33b8a15a6fc591d9b Mon Sep 17 00:00:00 2001 From: "Joshua N. Pritikin" Date: Fri, 14 Sep 2001 01:57:09 +0000 Subject: [PATCH] turn assertion into nice error message Original commit message from CVS: turn assertion into nice error message --- gst/gstpad.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index 6c5f37bd8a..11a881c224 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1446,7 +1446,12 @@ gst_pad_pull (GstPad *pad) GST_DEBUG_ENTER("(%s:%s)",GST_DEBUG_PAD_NAME(pad)); g_return_val_if_fail (GST_PAD_DIRECTION (pad) == GST_PAD_SINK, NULL); - g_return_val_if_fail (peer != NULL, NULL); + + if (!peer) + { + g_critical ("gst_pad_pull but %s:%s is unconnected", GST_DEBUG_PAD_NAME(pad)); + return NULL; + } if (peer->gethandler) { GST_DEBUG (GST_CAT_DATAFLOW,"calling gethandler %s of peer pad %s:%s\n",