sc/source/core/data/SolverSettings.cxx | 2 ++ sc/source/core/tool/interpretercontext.cxx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
New commits: commit c80ed3ef7ce008d5fb8116e09b00b0a6cb6eb835 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Mar 25 10:16:22 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Mar 25 20:23:00 2024 +0100 cid#1594674 Using invalid iterator Change-Id: I710a6a2f045de095f5f3f09a971162b669eedd4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165275 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/data/SolverSettings.cxx b/sc/source/core/data/SolverSettings.cxx index 64735722568f..99bb6d9af2fc 100644 --- a/sc/source/core/data/SolverSettings.cxx +++ b/sc/source/core/data/SolverSettings.cxx @@ -786,6 +786,8 @@ bool SolverSettings::TabHasSolverModel() { // Check if the named range for the objective value exists in the sheet const auto iter = m_mNamedRanges.find(SP_OBJ_CELL); + if (iter == m_mNamedRanges.end()) + return false; OUString sRange = iter->second; ScRangeData* pRangeData = m_pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(sRange)); commit 064b9211ffdf82ef29ce02ff288d6a83d2a7d167 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Mar 25 10:15:09 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Mar 25 20:22:47 2024 +0100 cid#1454847 Uninitialized pointer field Change-Id: I81aea5f73b9b28e28366beb74e853518287a9ef7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165274 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/tool/interpretercontext.cxx b/sc/source/core/tool/interpretercontext.cxx index 6bd903d4de58..ce9040ec30b4 100644 --- a/sc/source/core/tool/interpretercontext.cxx +++ b/sc/source/core/tool/interpretercontext.cxx @@ -41,7 +41,9 @@ ScInterpreterContext::ScInterpreterContext(const ScDocument& rDoc, SvNumberForma , pInterpreter(nullptr) , mpFormatter(pFormatter) { - if (pFormatter) + if (!pFormatter) + mpFormatData = nullptr; + else { mxLanguageData.reset(new SvNFLanguageData(pFormatter->GetROLanguageData())); mpFormatData = &pFormatter->GetROFormatData();