From 1d97f026abc84d8f763f59f39af1a344f362d105 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 10 Mar 2004 23:52:02 +0000 Subject: [PATCH] tools/gst-run.c: Fix crash when no relevant tools were found. (bug #136793) Original commit message from CVS: * tools/gst-run.c: (main): Fix crash when no relevant tools were found. (bug #136793) --- ChangeLog | 5 +++++ tools/gst-run.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7574c8cf37..515bcf40b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-10 David Schleef + + * tools/gst-run.c: (main): Fix crash when no relevant tools + were found. (bug #136793) + 2004-03-10 Johan Dahlin * gst/schedulers/gstoptimalscheduler.c diff --git a/tools/gst-run.c b/tools/gst-run.c index b5bc2a58aa..d9a1ed7bd5 100644 --- a/tools/gst-run.c +++ b/tools/gst-run.c @@ -341,15 +341,16 @@ int main } else { + highest = NULL; + /* otherwise, just look up the highest version */ g_hash_table_foreach (candidates, (GHFunc) find_highest_version, &highest); - dir = g_hash_table_lookup (candidates, highest); - if (!dir) - { + if (highest == NULL) { g_print ("ERROR: No version of tool %s not found.\n", base); return 1; } + dir = g_hash_table_lookup (candidates, highest); binary = g_strdup_printf ("%s-%s", base, highest); }