Skip to content

Commit

Permalink
+ bug fix similar to idea of pull request 111
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Mar 7, 2016
1 parent d1b4f23 commit 007a00b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/App/Application.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 007a00b

Please sign in to comment.