diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-11-11 16:51:05 -0500 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-26 11:46:14 +0200 |
commit | a1b718044dadc46388bff0e20a7e50bf9d514596 (patch) | |
tree | b3fb931817786bd6ce5c472fb600f411192e4441 /sfx2 | |
parent | e054cfb3538fec4992ab28627a26aa23b6c4fbb7 (diff) |
LOK: sidebar: release LOKNotifier on destruction
And enable sidebar routing only while we have a
valid SidebarController instance (i.e. not disposed).
Change-Id: I665f934f762c0ce9efdce5489ec9babe006376a8
Reviewed-on: https://gerrit.libreoffice.org/73512
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarDockingWindow.cxx | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 6b3bcc025e0d..bbdb1a4c8c67 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -205,6 +205,10 @@ void SidebarController::unregisterSidebarForFrame(SidebarController* pController void SidebarController::disposeDecks() { SolarMutexGuard aSolarMutexGuard; + + if (comphelper::LibreOfficeKit::isActive()) + mpParentWindow->ReleaseLOKNotifier(); + mpCurrentDeck.clear(); maFocusManager.Clear(); mpResourceManager->disposeDecks(); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 834bb59f26bb..a12bb6f4d12e 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -113,7 +113,7 @@ void SidebarDockingWindow::NotifyResize() { if (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && mbSidebarVisibleInLOK) { - if (!GetLOKNotifier()) + if (mpSidebarController.is() && !GetLOKNotifier()) SetLOKNotifier(SfxViewShell::Current()); if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) |