From 8ad5e7714071d2fd61a601f6f235774c0542814d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 8 Oct 2005 11:16:03 +0000 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ tools/gst-inspect.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1272ccb..706ff46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-08 Tim-Philipp Müller + + * tools/gst-inspect.c: (print_element_properties_info): + Can't pass NULL strings to g_print() on windows. + 2005-10-08 Thomas Vander Stichele * docs/Makefile.am: diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index b339d78..b32e6ec 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -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); } -- 2.7.4