avoid crash when update on object not seen in model

svn: r12811
This commit is contained in:
Benny Malengier 2009-07-16 21:47:06 +00:00
parent 8b8c63b439
commit c2c937ae5d

View File

@ -219,8 +219,13 @@ class FlatNodeMap(object):
:param handle: the key of the object for which the path in the treeview
is needed
:param type: an object handle
:Returns: the path, or None if handle does not link to a path
"""
return self.real_path(self._hndl2index.get(handle))
index = self._hndl2index.get(handle)
if index is None:
return None
else:
return self.real_path(index)
def get_handle(self, path):
"""