summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-01-16 22:40:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-21 15:28:31 +0000
commit3a05b353f6d8a08536f324f46778d2a1356778e8 (patch)
tree40df072449f8f2ea9540986e9c17c529688302aa
parent2be982d5b7e3409aca610d2f6e986550f348f81f (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 (cherry picked from commit 9af8e14e67d354bb7736271a76a3dd8b6da78fd9) Reviewed-on: https://gerrit.libreoffice.org/13964 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 794fb5695add..35a827fb5134 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -2064,6 +2064,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 );
}