[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 1 12:49:19 UTC 2020
sc/source/ui/cctrl/checklistmenu.cxx | 5 ++++-
sc/source/ui/inc/checklistmenu.hxx | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 8e75c42253d92a014baf24dda82d3379bd736978
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Nov 23 09:41:37 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Dec 1 13:48:45 2020 +0100
Avoid crash while closing autofilter
EndPopupMode called on destroy causes set of actions
which may cause a crash in DockingManager
Change-Id: Ia01f6ca6e200a2e23f8b72da26053dbf800316a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106969
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index deeb987ee806..6798520f1ffb 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -400,7 +400,8 @@ void ScCheckListMenuControl::setSubMenuFocused(const ScCheckListMenuControl* pSu
void ScCheckListMenuControl::EndPopupMode()
{
vcl::Window::GetDockingManager()->EndPopupMode(mxFrame);
- mxFrame->EnableDocking(false);
+ if (!mbDisposing)
+ mxFrame->EnableDocking(false);
}
void ScCheckListMenuControl::StartPopupMode(const tools::Rectangle& rRect, FloatWinPopupFlags eFlags)
@@ -465,6 +466,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
, mbCanHaveSubMenu(bCanHaveSubMenu)
, maOpenTimer(this)
, maCloseTimer(this)
+ , mbDisposing(false)
{
/*
tdf#136559 If we have no dates we don't need a tree
@@ -579,6 +581,7 @@ void ScCheckListMenuControl::GrabFocus()
ScCheckListMenuControl::~ScCheckListMenuControl()
{
+ mbDisposing = true;
EndPopupMode();
for (auto& rMenuItem : maMenuItems)
rMenuItem.mxSubMenuWin.disposeAndClear();
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 5d4d6a6abd33..74014e9ce80d 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -293,6 +293,7 @@ private:
SubMenuItemData maOpenTimer;
SubMenuItemData maCloseTimer;
+ bool mbDisposing;
};
/**
More information about the Libreoffice-commits
mailing list