desktop/source/lib/init.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b79fe36b37cd02dfa992e26a30a2956d02a77ef9
Author:     Michael Meeks <[email protected]>
AuthorDate: Fri Jan 25 17:47:15 2019 +0000
Commit:     Andras Timar <[email protected]>
CommitDate: Fri Feb 8 22:15:40 2019 +0100

    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 <[email protected]>
    (cherry picked from commit 175274a6bca20451ccd6b5574e118265449f7642)
    Reviewed-on: https://gerrit.libreoffice.org/66930
    Reviewed-by: Andras Timar <[email protected]>
    Tested-by: Andras Timar <[email protected]>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index dae96c2e62b6..739b21dbaf11 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1579,8 +1579,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)
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to