summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-16 14:12:03 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-10-18 09:56:39 +0200
commitdb742b6cb627f807ff62c4ede3ddb5260b5f41b0 (patch)
tree6d36a7b2cb182294dcf34c61ee3f2844c2485af2
parentd90c78640042001944a7b0799e4ef33e123c9bd5 (diff)
ofz#40008 check if column exists before EndListening attempt
Change-Id: Iad6a7f215aa36fb6f8bb35e14aa5b882bf9773f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123637 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-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 7af84bcd58dc..fb8e32f19af2 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -1152,7 +1152,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)