[d-feet] fix crash on empty selection
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [d-feet] fix crash on empty selection
- Date: Tue, 15 Nov 2011 14:04:02 +0000 (UTC)
commit c917ff09e352300b41e34bb39ffe420ee24ada4a
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Nov 15 08:59:27 2011 -0500
fix crash on empty selection
dfeet/_ui/busnameinfobox.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/dfeet/_ui/busnameinfobox.py b/dfeet/_ui/busnameinfobox.py
index 8041a43..6fbecf6 100644
--- a/dfeet/_ui/busnameinfobox.py
+++ b/dfeet/_ui/busnameinfobox.py
@@ -95,9 +95,9 @@ class BusNameInfoBox(gtk.VBox):
def cursor_changed_handler(self, treeview):
node = self.get_selected_node()
- node.on_selected(self.busname)
-
- self.emit('selected', node)
+ if node:
+ node.on_selected(self.busname)
+ self.emit('selected', node)
def get_selected_node(self):
selection = self.introspect_tree_view.get_selection()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]