timeline: fix segfaults
authorLubosz Sarnecki <lubosz@gmail.com>
Thu, 20 Jun 2013 12:23:26 +0000 (14:23 +0200)
committerThibault Saunier <thibault.saunier@collabora.com>
Thu, 20 Jun 2013 13:54:02 +0000 (09:54 -0400)
don't call the timeline update, when the reference is invalid

https://bugzilla.gnome.org/show_bug.cgi?id=702605

ges/ges-base-xml-formatter.c
ges/ges-project.c

index 12d2ff0..96c4712 100644 (file)
@@ -382,6 +382,7 @@ _loading_done (GESFormatter * self)
   priv->parsecontext = NULL;
 
   g_hash_table_foreach (priv->layers, (GHFunc) _set_auto_transition, NULL);
+  ges_timeline_enable_update (self->timeline, TRUE);
   ges_project_set_loaded (self->project, self);
 }
 
index 1dd22c7..2607713 100644 (file)
@@ -516,8 +516,8 @@ ges_project_set_loaded (GESProject * project, GESFormatter * formatter)
   g_signal_emit (project, _signals[LOADED_SIGNAL], 0, formatter->timeline);
 
   /* We are now done with that formatter */
-  ges_project_remove_formatter (project, formatter);
   ges_timeline_enable_update (formatter->timeline, TRUE);
+  ges_project_remove_formatter (project, formatter);
   return TRUE;
 }