message: protect against null message sources

Message sources can be null, check if it is before trying to
access its name.
This commit is contained in:
Thiago Santos 2011-10-18 19:21:58 -03:00
parent 4c1397d572
commit 3ab02d8fdc

View file

@ -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));