From 9ac4a3426a63178607536e4ec85ac2984b775c62 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 14 Feb 2016 20:54:04 +0000 Subject: coverity#1352321 Dereference null return value and coverity#1352322 Dereference null return value Change-Id: I0482ed95e8fbce5d7f9a827588a66ebd0f9d69c7 --- sc/source/core/data/dociter.cxx | 4 ++-- 1 file 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; -- cgit