tools/gst-inspect.c: Can't pass NULL strings to g_print() on windows.
authorTim-Philipp Müller <tim@centricular.net>
Sat, 8 Oct 2005 11:16:03 +0000 (11:16 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sat, 8 Oct 2005 11:16:03 +0000 (11:16 +0000)
Original commit message from CVS:
* tools/gst-inspect.c: (print_element_properties_info):
Can't pass NULL strings to g_print() on windows.

ChangeLog
tools/gst-inspect.c

index 1272ccb..706ff46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-08  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * tools/gst-inspect.c: (print_element_properties_info):
+         Can't pass NULL strings to g_print() on windows.
+
 2005-10-08  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * docs/Makefile.am:
index b339d78..b32e6ec 100644 (file)
@@ -307,12 +307,17 @@ print_element_properties_info (GstElement * element)
         GParamSpecString *pstring = G_PARAM_SPEC_STRING (param);
 
         n_print ("%-23.23s String. ", "");
-        g_print ("Default: \"%s\" ", pstring->default_value);
+
+        if (pstring->default_value == NULL)
+          g_print ("Default: null ");
+        else
+          g_print ("Default: \"%s\" ", pstring->default_value);
+
         if (readable) {
           const char *string_val = g_value_get_string (&value);
 
           if (string_val == NULL)
-            g_print ("Current: \"\"");
+            g_print ("Current: null");
           else
             g_print ("Current: \"%s\"", string_val);
         }