diff options
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index a705f186b721..1fe49bc81774 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -659,9 +659,12 @@ void ScCondFormatDlg::OkPressed() nKey = pList->getMaxKey() + 1; } - pFormat->SetKey(nKey); pList->erase(nKey); - pList->InsertNew(pFormat); + if (pFormat) + { + pFormat->SetKey(nKey); + pList->InsertNew(pFormat); + } mpViewData->GetViewShell()->GetPool().Put(*mpDlgItem); SetDispatcherLock( false ); |