summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-06 06:52:03 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-06 21:25:11 +0200
commit7f127204ce0d601ef4b956b92c6ba433f753d534 (patch)
treec9988317161fe0cc5fcefdb6ac83bf66c10d1635 /sc/source
parentd8a854364f6c3d9a7a1de2073d3ff5f17c5c2762 (diff)
prevent crash when no cond format will be defined in cond format dlg
Change-Id: Iffc54ada1fcf586c00eddf934079fa671f263ce0
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index c6a6465a785d..0bd35387f793 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -257,6 +257,9 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, AddBtnHdl)
if(pDlg->Execute() == RET_OK)
{
ScConditionalFormat* pNewFormat = pDlg->GetConditionalFormat();
+ if(!pNewFormat)
+ return 0;
+
mpFormatList->InsertNew(pNewFormat);
pNewFormat->SetKey(FindKey(mpFormatList));
maCtrlManager.Update();