svx/source/tbxctrls/tbcontrl.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit a508f2ee91cb6c11c5f1b195270d37c6a3a5d141 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jan 16 15:07:36 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jan 16 18:35:23 2020 +0100 fix a crash in welded color toolbar menu Change-Id: I7d11dfddc627e96710a6a16136292abefacc3ab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86931 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index e190200810e7..951fc284280e 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2074,11 +2074,11 @@ IMPL_LINK(ColorWindow, AutoColorClickHdl, weld::Button&, rButton, void) mxRecentColorSet->SetNoSelection(); mpDefaultButton = &rButton; - maMenuButton.set_inactive(); - maSelectedLink.Call(aNamedColor); maColorSelectFunction(maCommand, aNamedColor); + + maMenuButton.set_inactive(); } IMPL_LINK_NOARG(SvxColorWindow, OpenPickerClickHdl, Button*, void) @@ -2103,8 +2103,15 @@ IMPL_LINK_NOARG(SvxColorWindow, OpenPickerClickHdl, Button*, void) IMPL_LINK_NOARG(ColorWindow, OpenPickerClickHdl, weld::Button&, void) { + // copy before set_inactive + auto nColor = GetSelectEntryColor().first; + auto pParentWindow = mpParentWindow; + OUString sCommand = maCommand; + std::shared_ptr<PaletteManager> xPaletteManager(mxPaletteManager); + maMenuButton.set_inactive(); - mxPaletteManager->PopupColorPicker(mpParentWindow, maCommand, GetSelectEntryColor().first); + + xPaletteManager->PopupColorPicker(pParentWindow, sCommand, nColor); } void SvxColorWindow::SetNoSelection() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits