summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-01-16 22:40:36 +0100
committerEike Rathke <erack@redhat.com>2015-01-16 22:44:09 +0100
commit9af8e14e67d354bb7736271a76a3dd8b6da78fd9 (patch)
treeb60f5c228a2c9fe008d4d4202678be1e7f7f9dc6
parent15e802fabbfff047c1a8d768dea8fc04a2f82a49 (diff)
don't access empty range list, could be rhbz#1180312
ScRangeList::DeleteArea() may remove an entire range, if it was the last range a subsequent call to ScConditionalFormat::DeleteArea() would attempt to access an invalid first element. Change-Id: I8d68c27963dc8561d61a94980093c271bd3aaffb
-rw-r--r--sc/source/core/data/conditio.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index d0913987183d..5b1bbef0b854 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -2063,6 +2063,9 @@ void ScConditionalFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt )
void ScConditionalFormat::DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
+ if (maRanges.empty())
+ return;
+
SCTAB nTab = maRanges[0]->aStart.Tab();
maRanges.DeleteArea( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
}