added GST_STR_NULL to check for NULL strings. Fixed a case where a char* given to...
authorBenjamin Otte <otte@gnome.org>
Thu, 1 May 2003 16:36:27 +0000 (16:36 +0000)
committerBenjamin Otte <otte@gnome.org>
Thu, 1 May 2003 16:36:27 +0000 (16:36 +0000)
Original commit message from CVS:
added GST_STR_NULL to check for NULL strings. Fixed a case where a char* given to printf was NULL to use that macro.

gst/gstinfo.h
gst/gstplugin.c

index e7012d1..9793af8 100644 (file)
@@ -32,6 +32,9 @@
 #include <config.h>
 #endif
 
+/* This is needed in printf's if a char* might be NULL. Solaris crashes then */
+#define GST_STR_NULL(str) ((str) ? (str) : "(NULL)")
+
 /* FIXME: convert to using G_STRLOC all the way if we can ! */
 
 #ifndef FUNCTION
index 853691c..9401b66 100644 (file)
@@ -111,7 +111,7 @@ gst_plugin_register_func (GstPluginDesc *desc, GstPlugin *plugin, GModule *modul
        plugin->filename);
     return NULL;
   }
-  GST_INFO (GST_CAT_PLUGIN_LOADING,"plugin \"%s\" initialised", plugin->filename);
+  GST_INFO (GST_CAT_PLUGIN_LOADING,"plugin \"%s\" initialised", GST_STR_NULL (plugin->filename));
 
   return plugin;
 }
@@ -529,4 +529,3 @@ gst_library_load (const gchar *name)
 
   return res;
 }
-