don't fail when we scroll features window with no row selected

This commit is contained in:
Yann Leboulanger 2007-12-24 10:24:52 +00:00
parent 47e0b6d18f
commit 829cc3acb8
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ class FeaturesWindow:
def on_features_treeview_cursor_changed(self, widget): def on_features_treeview_cursor_changed(self, widget):
selection = widget.get_selection() selection = widget.get_selection()
if not selection:
return
path = selection.get_selected_rows()[1][0] path = selection.get_selected_rows()[1][0]
available = self.model[path][1] available = self.model[path][1]
feature = self.model[path][0].decode('utf-8') feature = self.model[path][0].decode('utf-8')