gst/debug/tests.c: fix segfault on gst-inspect

Original commit message from CVS:
* gst/debug/tests.c: (md5_get_value):
fix segfault on gst-inspect
This commit is contained in:
Benjamin Otte 2004-05-19 14:59:25 +00:00
parent c7a62ce9dc
commit b56a66e04a
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-05-19 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/debug/tests.c: (md5_get_value):
fix segfault on gst-inspect
2004-05-19 Benjamin Otte <in7y118@public.uni-hamburg.de> 2004-05-19 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/debug/testplugin.c: * gst/debug/testplugin.c:

View file

@ -539,7 +539,9 @@ md5_get_value (gpointer test, GValue * value)
{ {
MD5Test *ctx = test; MD5Test *ctx = test;
if (ctx->result[0] == 0) { if (!ctx) {
g_value_set_string (value, "---");
} else if (ctx->result[0] == 0) {
gchar *str = g_new (gchar, 33); gchar *str = g_new (gchar, 33);
str[32] = 0; str[32] = 0;