[pitivi] transitions: Handle attempts to disconnect nonexistent signals



commit 9f73067c9432fe4528fc576ba89f87f694cc21eb
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Tue May 29 16:29:37 2012 -0400

    transitions: Handle attempts to disconnect nonexistent signals

 pitivi/transitions.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index 07a4d36..0ac6879 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -325,6 +325,12 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
             self.element.disconnect_by_func(self._transitionTypeChangedCb)
         except TypeError:
             pass
+        except AttributeError:
+            # This happens when selecting a normal track object before any
+            # transition object has been created. Normal track objects don't
+            # have these signals, so we just ignore them. Anyway, we just want
+            # to deactivate the UI now.
+            pass
         self.iconview.unselect_all()
         self.iconview.set_sensitive(False)
         self.props_widgets.set_sensitive(False)



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