summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 03fbeb3a4aa5..e510ba923168 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -216,8 +216,11 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl)
sal_Int32 nKey = pFormat->GetKey();
mpFormatList->erase(nKey);
ScConditionalFormat* pNewFormat = pDlg->GetConditionalFormat();
- pNewFormat->SetKey(nKey);
- mpFormatList->InsertNew(pNewFormat);
+ if (pNewFormat)
+ {
+ pNewFormat->SetKey(nKey);
+ mpFormatList->InsertNew(pNewFormat);
+ }
maCtrlManager.Update();
}
delete pDlg;