[0.11] gstreamer: message: protect against null message sources

Edward Hervey bilboed at kemper.freedesktop.org
Fri Oct 21 01:56:50 PDT 2011


Module: gstreamer
Branch: 0.11
Commit: 3ab02d8fdcb32ba2cc68b749956272df005247b1
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=3ab02d8fdcb32ba2cc68b749956272df005247b1

Author: Thiago Santos <thiago.sousa.santos at collabora.com>
Date:   Tue Oct 18 19:21:58 2011 -0300

message: protect against null message sources

Message sources can be null, check if it is before trying to
access its name.

---

 gst/gstmessage.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gst/gstmessage.c b/gst/gstmessage.c
index 93b34fd..423ebc2 100644
--- a/gst/gstmessage.c
+++ b/gst/gstmessage.c
@@ -192,8 +192,7 @@ gst_message_finalize (GstMessage * message)
   g_return_if_fail (message != NULL);
 
   GST_CAT_LOG (GST_CAT_MESSAGE, "finalize message %p, %s from %s", message,
-      GST_MESSAGE_TYPE_NAME (message),
-      GST_OBJECT_NAME (GST_MESSAGE_SRC (message)));
+      GST_MESSAGE_TYPE_NAME (message), GST_MESSAGE_SRC_NAME (message));
 
   if (GST_MESSAGE_SRC (message)) {
     gst_object_unref (GST_MESSAGE_SRC (message));



More information about the gstreamer-commits mailing list