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/?p=xestiaab%2F.git;a=commitdiff_plain;h=0f60dc86194f56ea5db452f94cf24bea25897dd0;hp=5a47454be4281d2c2a8273df2b509537831c9aad 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.