From db742b6cb627f807ff62c4ede3ddb5260b5f41b0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 16 Oct 2021 14:12:03 +0100 Subject: 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 --- sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 | Bin 0 -> 372 bytes sc/source/core/data/table5.cxx | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 (limited to 'sc') 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 Binary files /dev/null and b/sc/qa/unit/data/qpro/pass/ofz40008-1.wb2 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) -- cgit