From 3a6f42bf67049fd3a24dcab76ad96506fff14c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 30 Sep 2013 09:51:21 -0400 Subject: [PATCH] gst-validate: Don't use the GOptionContext after freeing it --- validate/tools/gst-validate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c index e4f270cce1..da2170ad9d 100644 --- a/validate/tools/gst-validate.c +++ b/validate/tools/gst-validate.c @@ -144,8 +144,6 @@ main (int argc, gchar ** argv) g_setenv ("GST_VALIDATE_SCENARIO", scenario, TRUE); } - g_option_context_free (ctx); - gst_init (&argc, &argv); gst_validate_init (); @@ -154,9 +152,12 @@ main (int argc, gchar ** argv) if (argc == 1) { g_print ("%s", g_option_context_get_help (ctx, FALSE, NULL)); + g_option_context_free (ctx); exit (1); } + g_option_context_free (ctx); + /* Create the pipeline */ argvn = g_new0 (char *, argc); memcpy (argvn, argv + 1, sizeof (char *) * (argc - 1));