more str null protection
authorThomas Vander Stichele <thomas@apestaart.org>
Tue, 11 Oct 2005 16:21:05 +0000 (16:21 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Tue, 11 Oct 2005 16:21:05 +0000 (16:21 +0000)
Original commit message from CVS:
more str null protection

ChangeLog
tools/gst-launch.c

index 90970bd..2b47fa7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-10-11  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * tools/gst-launch.c: (main):
+         more null protecting
+
+2005-10-11  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * gst/gst-i18n-lib.h:
          check for ENABLE_NLS, not GETTEXT_PACKAGE
        * gst/gstregistry.c: (gst_registry_add_plugin),
index d89db72..880696a 100644 (file)
@@ -530,7 +530,7 @@ main (int argc, char *argv[])
   g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
   g_option_context_add_group (ctx, gst_init_get_option_group ());
   if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
-    g_print ("Error initializing: %s\n", err->message);
+    g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
     exit (1);
   }
 
@@ -585,14 +585,15 @@ main (int argc, char *argv[])
   if (!pipeline) {
     if (error) {
       fprintf (stderr, _("ERROR: pipeline could not be constructed: %s.\n"),
-          error->message);
+          GST_STR_NULL (error->message));
       g_error_free (error);
     } else {
       fprintf (stderr, _("ERROR: pipeline could not be constructed.\n"));
     }
     return 1;
   } else if (error) {
-    fprintf (stderr, _("WARNING: erroneous pipeline: %s\n"), error->message);
+    fprintf (stderr, _("WARNING: erroneous pipeline: %s\n"),
+        GST_STR_NULL (error->message));
     g_error_free (error);
     return 1;
   }