udpsink: don't crash on NULL error
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Aug 2012 15:23:25 +0000 (17:23 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Aug 2012 15:27:27 +0000 (17:27 +0200)
Check if there is an error before retrieving its message.

See https://bugzilla.gnome.org/show_bug.cgi?id=682481

gst/udp/gstmultiudpsink.c

index 8db4db9..195d2ca 100644 (file)
@@ -790,7 +790,8 @@ join_group_failed:
   {
     gst_multiudpsink_stop (GST_BASE_SINK (sink));
     GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS, (NULL),
-        ("Could not join multicast group: %s", err->message));
+        ("Could not join multicast group: %s",
+            err ? err->message : "unknown reason"));
     g_clear_error (&err);
     return FALSE;
   }