validate: tools: Unref the pipeline before the runner and monitor
authorThibault Saunier <thibault.saunier@collabora.com>
Mon, 13 Jan 2014 08:41:16 +0000 (09:41 +0100)
committerThibault Saunier <thibault.saunier@collabora.com>
Thu, 6 Feb 2014 11:02:57 +0000 (12:02 +0100)
Avoids segfault in some cases, and monitors and runners have week ref on
their targets.

validate/tools/gst-validate.c

index bcc7e7a..4322def 100644 (file)
@@ -227,9 +227,9 @@ main (int argc, gchar ** argv)
 exit:
   gst_element_set_state (pipeline, GST_STATE_NULL);
   g_main_loop_unref (mainloop);
-  g_object_unref (monitor);
-  g_object_unref (runner);
   g_object_unref (pipeline);
+  g_object_unref (runner);
+  g_object_unref (monitor);
 #ifdef G_OS_UNIX
   g_source_remove (signal_watch_id);
 #endif