From bd3019d24af91ee264783ed9d9d1d8bb624ff159 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 7 Apr 2021 15:31:35 +0100 Subject: only call mpCurrentDeck->GetLOKNotifier if we need to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7a4205a51a40d4404c304a4db992baf198eb015e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113742 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sfx2/source/sidebar/SidebarController.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sfx2') 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"); } -- cgit v1.2.3