gst-validate: Don't use the GOptionContext after freeing it

This commit is contained in:
Olivier Crête 2013-09-30 09:51:21 -04:00
parent 8ac446b010
commit 3a6f42bf67

View file

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