summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-07 15:31:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-07 21:23:57 +0200
commitbd3019d24af91ee264783ed9d9d1d8bb624ff159 (patch)
tree7412af2709709a8543355a5a5c15eb66705623a0 /sfx2
parentdbd06d22ad3c1db87ed210092d6a54fbb5c5000a (diff)
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@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx3
1 files changed, 1 insertions, 2 deletions
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");
}