From b7e4eeb0b06b164c845a958651e3a731e60e7bee Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 23 Nov 2011 17:39:43 +0100 Subject: [PATCH] bus: handle NULL message src in debug --- gst/gstbus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/gstbus.c b/gst/gstbus.c index a1250511c0..7385725600 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -481,9 +481,12 @@ gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout, while ((message = gst_atomic_queue_pop (bus->queue))) { if (bus->priv->poll) gst_poll_read_control (bus->priv->poll); + GST_DEBUG_OBJECT (bus, "got message %p, %s from %s, type mask is %u", message, GST_MESSAGE_TYPE_NAME (message), - GST_OBJECT_NAME (GST_MESSAGE_SRC (message)), (guint) types); + GST_MESSAGE_SRC (message) ? + GST_OBJECT_NAME (GST_MESSAGE_SRC (message)) : "NULL", (guint) types); + if ((GST_MESSAGE_TYPE (message) & types) != 0) { /* exit the loop, we have a message */ goto beach;