summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-01-16 22:40:36 +0100
committerAndras Timar <andras.timar@collabora.com>2015-01-24 16:54:44 +0100
commit9dc81cc0f0911a50328bef995099f3467f20a07a (patch)
treeb91bfb21de12d326337c792c86974f8b6d5f8676 /sc
parent046e9eb33af47649a931c76f7541b536143287fd (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/13965 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-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 80a2b53c26dd..7a3c085513dc 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -2088,6 +2088,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 );
}