[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 11 09:00:24 UTC 2020
svx/source/tbxctrls/tbcontrl.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 35947e357c8a4d2a98f970c5f78f00b27a8ff7ed
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 10 14:14:12 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Feb 11 09:59:42 2020 +0100
on main window getting focus gtk is destroying the popup windows itself
so copy the data we need before it can do that
Change-Id: If35d7ba0f272475e82f969bd80c6ff44131a3d2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88376
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 5a72ebf3982a..8096ac0168f1 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2025,9 +2025,14 @@ IMPL_LINK(ColorWindow, SelectHdl, SvtValueSet*, pColorSet, void)
maSelectedLink.Call(aNamedColor);
- maColorSelectFunction(maCommand, aNamedColor);
+ // deliberate take a copy here in case maMenuButton.set_inactive
+ // triggers a callback that destroys ourself
+ ColorSelectFunction aColorSelectFunction(maColorSelectFunction);
+ OUString sCommand(maCommand);
maMenuButton.set_inactive();
+
+ aColorSelectFunction(sCommand, aNamedColor);
}
IMPL_LINK_NOARG(SvxColorWindow, SelectPaletteHdl, ListBox&, void)
More information about the Libreoffice-commits
mailing list