summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-16 14:12:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-16 20:10:59 +0200
commit7528bb3c5098a67f32523c028d83dfbc79a7c6a0 (patch)
tree7355dac9883e892d85db0b4057a6baffd3d35e68
parentf6a5efc7cde6e7d723e05b866bc6de1bb56913b0 (diff)
ofz#40008 check if column exists before EndListening attempt
Change-Id: Iad6a7f215aa36fb6f8bb35e14aa5b882bf9773f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/qa/unit/data/qpro/pass/ofz40008-1.wb2bin0 -> 372 bytes
-rw-r--r--sc/source/core/data/table5.cxx3
2 files changed, 2 insertions, 1 deletions
diff --git a/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 b/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2
new file mode 100644
index 000000000000..d4adc7d484c9
--- /dev/null
+++ b/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2
Binary files differ
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 646984b7c699..e885f4c704bd 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -1148,7 +1148,8 @@ void ScTable::EndListening(sc::EndListeningContext& rCxt, const ScAddress& rAddr
if (!ValidCol(rAddress.Col()))
return;
- aCol[rAddress.Col()].EndListening(rCxt, rAddress, rListener);
+ if (rAddress.Col() < aCol.size())
+ aCol[rAddress.Col()].EndListening(rCxt, rAddress, rListener);
}
void ScTable::SetPageStyle(const OUString& rName)