From: Steve Brokenshire Date: Sun, 6 May 2018 11:53:48 +0000 (+0100) Subject: odthelpbrowser/main.cpp: Don't continue if file cannot be loaded X-Git-Tag: release-0.23~14 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=0f60dc86194f56ea5db452f94cf24bea25897dd0;p=xestiaab%2F.git odthelpbrowser/main.cpp: Don't continue if file cannot be loaded --- diff --git a/source/tools/odthelpbrowser/main.cpp b/source/tools/odthelpbrowser/main.cpp index 2d8aa4d..3da4d51 100644 --- a/source/tools/odthelpbrowser/main.cpp +++ b/source/tools/odthelpbrowser/main.cpp @@ -54,9 +54,10 @@ bool ODTHelpBrowser::OnInit() std::string fileToLoad = std::string(documentFilename.mb_str()); - if (!odtDocument.LoadDocument(fileToLoad); + if (!odtDocument.LoadDocument(fileToLoad)) { std::cout << "Unable to open file " << documentFilename.mb_str() << std::endl; + return false; } // Setup the form and load in the document data.