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 5331e8ac33ae..975d1ad5335f 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1799,6 +1799,10 @@ bool ScQueryCellIterator::BinarySearch() if (nTab >= pDoc->GetTableCount()) OSL_FAIL("try to access index out of bounds, FIX IT"); nCol = mpParam->nCol1; + + if (nCol >= pDoc->maTabs[nTab]->GetAllocatedColumnsCount()) + return false; + ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol]; if (pCol->IsEmptyData()) return false; |