Resolves: tdf#100201 crash on apply custom color

regression from...

commit 789055bc2a
Date:   Tue Apr 12 16:39:03 2016 +0200

    clang-tidy performance-unnecessary-copy-initialization

    probably not much performance benefit, but it sure is good at
    identifying leftover intermediate variables from previous
    refactorings.

This case has a comment explaining the problem that appeared post
change.

Change-Id: Ib0c0883c57f103656cda00e3a94399a515d7fe41
This commit is contained in:
Caolán McNamara
2016-06-04 20:43:44 +01:00
parent 4005d61cd1
commit 301a87c861

View File

@@ -227,7 +227,7 @@ void PaletteManager::SetColorSelectFunction(const std::function<void(const OUStr
void PaletteManager::PopupColorPicker(const OUString& aCommand)
{
// The calling object goes away during aColorDlg.Execute(), so we must copy this
const OUString& aCommandCopy = aCommand;
OUString aCommandCopy = aCommand;
SvColorDialog aColorDlg( nullptr );
aColorDlg.SetColor ( mLastColor );
aColorDlg.SetMode( svtools::ColorPickerMode_MODIFY );