summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/PaletteManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/PaletteManager.cxx')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index ca4c014c8ef7..c561a5e6fb1b 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -197,6 +197,8 @@ void PaletteManager::SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater)
void PaletteManager::PopupColorPicker(const OUString& aCommand)
{
+ // The calling object goes away during aColorDlg.Execute(), so we must copy this
+ OUString aCommandCopy = aCommand;
SvColorDialog aColorDlg( 0 );
aColorDlg.SetColor ( mLastColor );
aColorDlg.SetMode( svtools::ColorPickerMode_MODIFY );
@@ -206,7 +208,7 @@ void PaletteManager::PopupColorPicker(const OUString& aCommand)
mpBtnUpdater->Update( aColorDlg.GetColor() );
mLastColor = aColorDlg.GetColor();
AddRecentColor( mLastColor );
- DispatchColorCommand(aCommand, mLastColor);
+ DispatchColorCommand(aCommandCopy, mLastColor);
}
}