[pitivi/ges] track: makes remove object callback more thread safe



commit cfe01f9be7f2ca466d4b87ce78a58790e2b9d10c
Author: Matas Brazdeikis <matas brazdeikis lt>
Date:   Sun May 6 21:41:42 2012 +0100

    track: makes remove object callback more thread safe

 pitivi/timeline/track.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 409d21f..ad2cff3 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -774,11 +774,11 @@ class Track(goocanvas.Group, Zoomable, Loggable):
             self.add_child(w)
 
     def _objectRemovedCb(self, unused_timeline, track_object):
-        if not isinstance(track_object, ges.TrackEffect):
-            w = self.widgets[track_object]
-            self.remove_child(w)
-            del self.widgets[track_object]
-            Zoomable.removeInstance(w)
+        if not isinstance(track_object, ges.TrackEffect) and track_object in self.widgets:
+                w = self.widgets[track_object]
+                del self.widgets[track_object]
+                self.remove_child(w)
+                Zoomable.removeInstance(w)
 
     def _transitionAdded(self, transition):
         w = TrackTransition(self.app, transition, self.track, self.timeline, self)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]