tdf#131389 crash clearing cell bg from sidebar
Change-Id: Id246c176bf44f2eb2d2e135400974c437f583a7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90669
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b2781ad..38d5574 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2069,9 +2069,14 @@ IMPL_LINK(ColorWindow, AutoColorClickHdl, weld::Button&, rButton, 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, OpenPickerClickHdl, Button*, void)