fix crash when saving a document after aborting a pending transaction

This commit is contained in:
wmayer
2016-08-31 17:58:55 +02:00
parent 9ef81d7d56
commit 6e284fc9ea
4 changed files with 22 additions and 0 deletions

View File

@@ -56,6 +56,14 @@ class DocumentBasicCases(unittest.TestCase):
self.Doc.undo()
self.Doc.undo()
def testAbortTransaction(self):
self.Doc.openTransaction("Add")
obj=self.Doc.addObject("App::FeatureTest","Label")
self.Doc.abortTransaction()
TempPath = tempfile.gettempdir()
SaveName = TempPath + os.sep + "SaveRestoreTests.FCStd"
self.Doc.saveAs(SaveName)
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)