From 399f528a332cdcfbdef9f00db4c8c4605e302aa8 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 22 Feb 2011 16:41:54 +0200 Subject: [PATCH] discoverer: handle desc==NULL It would otherwise be printed as (null) and mess up indentation (no \n). --- tools/gst-discoverer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/gst-discoverer.c b/tools/gst-discoverer.c index c68721b..00d2d0f 100644 --- a/tools/gst-discoverer.c +++ b/tools/gst-discoverer.c @@ -204,8 +204,10 @@ print_stream_info (GstDiscovererStreamInfo * info, void *depth) desc = gst_stream_video_information_to_string (info, GPOINTER_TO_INT (depth) + 1); - g_print ("%s", desc); - g_free (desc); + if (desc) { + g_print ("%s", desc); + g_free (desc); + } } } -- 2.7.4