diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-07 09:48:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-07 10:14:50 +0100 |
commit | b6e73c54c689e0b1709ea85006968ddb9d75dc95 (patch) | |
tree | 24f8c76852a5531c823ef4065435016a43417f8d /sc | |
parent | 15c819987fbf1feb534884e0c3a1fbcda2575252 (diff) |
coverity#735804 Explicit null dereferenced
Change-Id: I78e1d0ada0728e07e8ea9985eec1ef7334598152
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 3c00f78bfc16..35af1f7d90ae 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1022,13 +1022,6 @@ void ScColorScale3FrmtEntry::SetInactive() IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) { - bool bEnableEdit = true; - sal_Int32 nPos = pBox->GetSelectEntryPos(); - if(nPos < 2) - { - bEnableEdit = false; - } - Edit* pEd = NULL; if(pBox == &maLbEntryTypeMin) pEd = &maEdMin; @@ -1037,6 +1030,16 @@ IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) else if(pBox == &maLbEntryTypeMax) pEd = &maEdMax; + if (!pEd) + return 0; + + bool bEnableEdit = true; + sal_Int32 nPos = pBox->GetSelectEntryPos(); + if(nPos < 2) + { + bEnableEdit = false; + } + if(bEnableEdit) pEd->Enable(); else |