From 0f60dc86194f56ea5db452f94cf24bea25897dd0 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 6 May 2018 12:53:48 +0100 Subject: [PATCH 1/1] odthelpbrowser/main.cpp: Don't continue if file cannot be loaded --- source/tools/odthelpbrowser/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- 2.39.2