diff options
author | Eike Rathke <erack@redhat.com> | 2017-01-30 18:11:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-31 20:59:23 +0000 |
commit | 9b227212f648ecdd88926cbcbb6144f254b96223 (patch) | |
tree | 520d5e8f00cd9497883b5b6839755a316c1014a4 /sc/source | |
parent | b88b1b07e657716aa9975fee2dfc5a091c66a346 (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
(cherry picked from commit e32c8293709d4940ccf9f3def963e5a87925e583)
Reviewed-on: https://gerrit.libreoffice.org/33714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-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 c5f487005b7d..6f9cfbef23cb 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -632,9 +632,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 ); |