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)
This commit is contained in:
David Schleef 2004-03-10 23:52:02 +00:00
parent c2b46e7a8a
commit 1d97f026ab
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2004-03-10 David Schleef <ds@schleef.org>
* tools/gst-run.c: (main): Fix crash when no relevant tools
were found. (bug #136793)
2004-03-10 Johan Dahlin <johan@gnome.org>
* gst/schedulers/gstoptimalscheduler.c

View file

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