diff options
-rw-r--r-- | sc/source/core/data/dociter.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index d4e565edf80e8..686e426c8d526 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1798,6 +1798,10 @@ bool ScQueryCellIterator::BinarySearch() assert(nTab < rDoc.GetTableCount() && "index out of bounds, FIX IT"); nCol = maParam.nCol1; + + if (nCol >= rDoc.maTabs[nTab]->GetAllocatedColumnsCount()) + return false; + ScColumn* pCol = &(rDoc.maTabs[nTab])->aCol[nCol]; if (pCol->IsEmptyData()) return false; |