diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 10:42:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 16:30:36 +0100 |
commit | b8ddd25acb0f47db6ccaefd9e1ae7edd40d44d73 (patch) | |
tree | d0db2daf7f1ee8f881c82b2c19e252cc34a9ac52 /sc/source | |
parent | 4ed190494fc06e6486ca9c4860886605183a53e0 (diff) |
coverity#1242431 Explicit null dereferenced
Change-Id: I96cbc59931400ad2f348ffb44925e8fe34b782ed
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/condformat/condformatmgr.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx index d61fd36a669a..a46095f60c07 100644 --- a/sc/source/ui/condformat/condformatmgr.cxx +++ b/sc/source/ui/condformat/condformatmgr.cxx @@ -47,15 +47,18 @@ void ScCondFormatManagerWindow::Init() { SetUpdateMode(false); - for(ScConditionalFormatList::iterator itr = mpFormatList->begin(); itr != mpFormatList->end(); ++itr) + if (mpFormatList) { - SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(*itr), TREELIST_APPEND, 0xffff ); - maMapLBoxEntryToCondIndex.insert(std::pair<SvTreeListEntry*,sal_Int32>(pEntry,itr->GetKey())); + for(ScConditionalFormatList::iterator itr = mpFormatList->begin(); itr != mpFormatList->end(); ++itr) + { + SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(*itr), TREELIST_APPEND, 0xffff ); + maMapLBoxEntryToCondIndex.insert(std::pair<SvTreeListEntry*,sal_Int32>(pEntry,itr->GetKey())); + } } SetUpdateMode(true); - if (mpFormatList->size()) + if (mpFormatList && mpFormatList->size()) SelectRow(0); } |