diff options
Diffstat (limited to 'sfx2/source/doc/objserv.cxx')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index fedbfb205d..90ef2ee232 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -453,6 +453,10 @@ static void sendErrorToLOK(ErrCodeMsg error) if (error.GetCode().GetClass() == ErrCodeClass::NONE) return; + SfxViewShell* pNotifier = SfxViewShell::Current(); + if (!pNotifier) + return; + boost::property_tree::ptree aTree; aTree.put("code", error); aTree.put("kind", ""); @@ -465,7 +469,7 @@ static void sendErrorToLOK(ErrCodeMsg error) std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, OString(aStream.str())); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, OString(aStream.str())); } namespace |