From f24545a72cf43d0852c4f8edae0b3a9919120cdd Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Mon, 19 Mar 2012 20:59:01 +0100 Subject: check for negative sheet number here too, fdo#47503 Signed-off-by: Petr Mladek --- sc/source/core/data/documen5.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(maTabs.size()) && maTabs[nTab]) + if ( VALIDTAB(nTab) && nTab < static_cast(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->HasData( nCol, nRow ); else return false; -- cgit v1.2.3