+ bug fix similar to idea of pull request 111

This commit is contained in:
wmayer 2016-03-07 15:12:00 +01:00
parent d1b4f23388
commit 007a00b7f1

View File

@ -443,10 +443,15 @@ Document* Application::openDocument(const char * FileName)
newDoc->FileName.setValue(File.filePath());
// read the document
newDoc->restore();
return newDoc;
try {
// read the document
newDoc->restore();
return newDoc;
}
catch (...) {
closeDocument(newDoc->getName());
throw;
}
}
Document* Application::getActiveDocument(void) const