diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-14 20:54:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-14 20:59:29 +0000 |
commit | 9ac4a3426a63178607536e4ec85ac2984b775c62 (patch) | |
tree | 03fc5d45c114ae9d4b6c28dda8cfd2cb4ccc8223 | |
parent | 5969fc79cf2d67d8a7c1483f0cc2cf42c863efb4 (diff) |
coverity#1352321 Dereference null return value
and
coverity#1352322 Dereference null return value
Change-Id: I0482ed95e8fbce5d7f9a827588a66ebd0f9d69c7
-rw-r--r-- | sc/source/core/data/dociter.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index c174d994ee48..4ea2d54f0e18 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -789,7 +789,7 @@ ScFormulaGroupIterator::ScFormulaGroupIterator( ScDocument* pDoc ) : mnIndex(0) { ScTable *pTab = mpDoc->FetchTable(mnTab); - ScColumn *pCol = pTab->FetchColumn(mnCol); + ScColumn *pCol = pTab ? pTab->FetchColumn(mnCol) : nullptr; if (pCol) { mbNullCol = false; @@ -820,7 +820,7 @@ sc::FormulaGroupEntry* ScFormulaGroupIterator::next() return nullptr; } ScTable *pTab = mpDoc->FetchTable(mnTab); - ScColumn *pCol = pTab->FetchColumn(mnCol); + ScColumn *pCol = pTab ? pTab->FetchColumn(mnCol) : nullptr; if (pCol) { mbNullCol = false; |