summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx7
1 files changed, 6 insertions, 1 deletions
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)