diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-01-25 17:47:15 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-01-25 22:21:23 +0100 |
commit | 175274a6bca20451ccd6b5574e118265449f7642 (patch) | |
tree | 535de1483afec566232409bdb20e44974e73d756 /desktop | |
parent | 7422d394812958a2014615b996df0378cc7d495f (diff) |
lok: don't crash in simple LOK use-case with no callback.
Change-Id: I7bceba10f002ad5751e3d810f9a9767ad2e875bc
Reviewed-on: https://gerrit.libreoffice.org/66924
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c10283321221..a2845e0cc3e8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1577,8 +1577,11 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, } LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent); - int nState = doc_getSignatureState(pDocument); - pLib->mpCallback(LOK_CALLBACK_SIGNATURE_STATUS, OString::number(nState).getStr(), pLib->mpCallbackData); + if (pLib->mpCallback) + { + int nState = doc_getSignatureState(pDocument); + pLib->mpCallback(LOK_CALLBACK_SIGNATURE_STATUS, OString::number(nState).getStr(), pLib->mpCallbackData); + } return pDocument; } catch (const uno::Exception& exception) |