summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-01-30 18:11:49 +0100
committerEike Rathke <erack@redhat.com>2017-01-30 18:15:09 +0100
commite32c8293709d4940ccf9f3def963e5a87925e583 (patch)
tree6a40d455348078696d12a06abd22c161cea75b57
parentb87df03423b345ad83f1911db476d5ce50b8d0fb (diff)
Resolves: tdf#105410 do not crash on a deleted format
... if the last condition was deleted and the Manage list is to be updated. The format is gone. Change-Id: I0fc056b5c75849197f351871b0d05e5015d0d1bf
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx7
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 );