summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-03-16 20:29:27 -0400
committerpranavk <pranavk@collabora.co.uk>2018-07-17 17:08:50 +0200
commit7740223e300b67a1d620aafecd5146cf3fddfc3f (patch)
tree9f5f23e79598e6c09530ad33c90a98ac8178eb9b /libreofficekit
parent14044919204296f01d48bfe79eda2cd35cf50eb2 (diff)
lok: be informative and exit when tilebench fails to initialize
Change-Id: I11078e36aafc715b7103998a17e0cb01926b8e97 Reviewed-on: https://gerrit.libreoffice.org/51618 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 519293447189f75e842065f7ff211d395d0da4b6) Reviewed-on: https://gerrit.libreoffice.org/57575 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/tilebench/tilebench.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index 751fb179169f..ed3d57d05b3f 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -113,6 +113,12 @@ int main( int argc, char* argv[] )
aTimes.emplace_back("initialization");
// coverity[tainted_string] - build time test tool
Office *pOffice = lok_cpp_init(argv[1]);
+ if (pOffice == nullptr)
+ {
+ fprintf(stderr, "Failed to initialize Office from %s\n", argv[1]);
+ return 1;
+ }
+
aTimes.emplace_back();
const int max_parts = (argc > 3 ? atoi(argv[3]) : -1);