qa-scenario: avoid assertion on dispose
authorThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 31 Jul 2013 18:01:13 +0000 (15:01 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 31 Jul 2013 18:01:13 +0000 (15:01 -0300)
After an error, the pipeline might still be null, check before unreffing

validate/gst/qa/gst-qa-scenario.c

index 2bd079a..b86ceda 100644 (file)
@@ -442,7 +442,8 @@ gst_qa_scenario_dispose (GObject * object)
 {
   GstQaScenarioPrivate *priv = GST_QA_SCENARIO (object)->priv;
 
-  gst_object_unref (priv->pipeline);
+  if (priv->pipeline)
+    gst_object_unref (priv->pipeline);
   g_list_free_full (priv->seeks, (GDestroyNotify) _free_seek_info);
 
   G_OBJECT_CLASS (gst_qa_scenario_parent_class)->dispose (object);