tools/gst-inspect.c: Can't pass NULL strings to g_print() on windows.

Original commit message from CVS:
* tools/gst-inspect.c: (print_element_properties_info):
Can't pass NULL strings to g_print() on windows.
This commit is contained in:
Tim-Philipp Müller 2005-10-08 11:16:03 +00:00
parent 0a0d29d1b5
commit 8ad5e77140
2 changed files with 12 additions and 2 deletions

View file

@ -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:

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