[d-feet] fixed tree model crash



commit a670876d58a02d93307f3cab75fb6c088d467123
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Nov 15 09:01:15 2011 -0500

    fixed tree model crash

 dfeet/introspect_data.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/dfeet/introspect_data.py b/dfeet/introspect_data.py
index f68ed19..df5ad85 100644
--- a/dfeet/introspect_data.py
+++ b/dfeet/introspect_data.py
@@ -51,6 +51,8 @@ class Node:
         return self.child_list.index(child)
 
     def on_get_iter(self, path):
+        if path[0] >= len(self.child_list):
+            return None
         op = self.child_list[path[0]]
         if len(path) == 1:
             return op



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