From 829cc3acb800486ddad8d8d90aaaeac34559cf45 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 24 Dec 2007 10:24:52 +0000 Subject: [PATCH] don't fail when we scroll features window with no row selected --- src/features_window.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/features_window.py b/src/features_window.py index eeb983a98..7e2d92c1b 100644 --- a/src/features_window.py +++ b/src/features_window.py @@ -141,6 +141,8 @@ class FeaturesWindow: def on_features_treeview_cursor_changed(self, widget): selection = widget.get_selection() + if not selection: + return path = selection.get_selected_rows()[1][0] available = self.model[path][1] feature = self.model[path][0].decode('utf-8')