added GST_STR_NULL to check for NULL strings. Fixed a case where a char* given to printf was NULL to use that macro.

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.
This commit is contained in:
Benjamin Otte 2003-05-01 16:36:27 +00:00
parent fe9a0a6d05
commit c57955fc68
2 changed files with 4 additions and 2 deletions

View 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

View 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;
}