summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/documen5.cxx')
-rw-r--r--sc/source/core/data/documen5.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index f19a067b4f41..7b83b53d255e 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -636,7 +636,7 @@ void ScDocument::SetChartRangeList( const rtl::OUString& rChartName,
bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->HasData( nCol, nRow );
else
return false;