Do not delete child that is already gone.

Fixes #154
This commit is contained in:
Holger Rapp 2014-03-22 11:28:44 +01:00
parent 1b21741a2d
commit 5aaeae5e85

View File

@ -350,10 +350,11 @@ class EditableTextObject(TextObject):
child._parent = None
self._children.remove(child)
# If this is a tabstop, delete it
# If this is a tabstop, delete it. Might have been deleted already if
# it was nested.
try:
del self._tabstops[child.number]
except AttributeError:
except (AttributeError, KeyError):
pass
class NoneditableTextObject(TextObject):