bus: handle NULL message src in debug
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 23 Nov 2011 16:39:43 +0000 (17:39 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 23 Nov 2011 17:05:00 +0000 (18:05 +0100)
gst/gstbus.c

index a125051..7385725 100644 (file)
@@ -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;