diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-17 20:25:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-18 10:12:06 +0100 |
commit | f493cd83fbb2e572cf3d85aaf57fb202d763756d (patch) | |
tree | 6031a81fd736f3949915cc9a55152be0be242505 /svx/source/tbxctrls | |
parent | e5230535877e30c3b874495e8794faa3a42d8017 (diff) |
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>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b2781adf59fb..38d5574b745a 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) |