[Libreoffice-commits] core.git: sfx2/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 7 19:24:42 UTC 2021


 sfx2/source/sidebar/SidebarController.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit bd3019d24af91ee264783ed9d9d1d8bb624ff159
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 7 15:31:35 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Apr 7 21:23:57 2021 +0200

    only call mpCurrentDeck->GetLOKNotifier if we need to
    
    Change-Id: I7a4205a51a40d4404c304a4db992baf198eb015e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113742
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index d1f1e1a35ca4..95b664b8b96f 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1231,7 +1231,6 @@ void SidebarController::RequestCloseDeck()
 {
     if (comphelper::LibreOfficeKit::isActive() && mpCurrentDeck)
     {
-        const vcl::ILibreOfficeKitNotifier* pNotifier = mpCurrentDeck->GetLOKNotifier();
         const SfxViewShell* pViewShell = SfxViewShell::Current();
         if (pViewShell && pViewShell->isLOKMobilePhone())
         {
@@ -1246,7 +1245,7 @@ void SidebarController::RequestCloseDeck()
             const std::string message = aStream.str();
             pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str());
         }
-        else if (pNotifier)
+        else if (const vcl::ILibreOfficeKitNotifier* pNotifier = mpCurrentDeck->GetLOKNotifier())
             pNotifier->notifyWindow(mpCurrentDeck->GetLOKWindowId(), "close");
     }
 


More information about the Libreoffice-commits mailing list