[meld] dirdiff: Handle cursor update callbacks when we don't have a model



commit 56d35702a85b954263ff7e7e52e91b338e22431f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jan 12 06:22:24 2014 +1000

    dirdiff: Handle cursor update callbacks when we don't have a model

 meld/dirdiff.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 774fc55..4a42f0e 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -1002,7 +1002,7 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
 
     def on_treeview_cursor_changed(self, *args):
         pane = self._get_focused_pane()
-        if pane is None:
+        if pane is None or len(self.model) == 0:
             return
 
         cursor_path, cursor_col = self.treeview[pane].get_cursor()


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