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@redhat.com>
This commit is contained in:
Caolán McNamara
2020-02-10 14:14:12 +00:00
parent 559b41687f
commit 35947e357c

View File

@@ -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)