0000525: Crash when doing an undo of an already deleted object

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5334 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer
2011-12-21 17:07:41 +00:00
parent aab04bd85e
commit d388f35fd0
3 changed files with 15 additions and 10 deletions

View File

@@ -47,6 +47,15 @@ class DocumentBasicCases(unittest.TestCase):
self.Doc.commitTransaction()
self.Doc.undo()
def testAddRemoveUndo(self):
# Bug #0000525
self.Doc.openTransaction("Add")
obj=self.Doc.addObject("App::FeatureTest","Label")
self.Doc.commitTransaction()
self.Doc.removeObject(obj.Name)
self.Doc.undo()
self.Doc.undo()
def testRemoval(self):
# Cannot write a real test case for that but when debugging the
# C-code there shouldn't be a memory leak (see rev. 1814)