sc/source/ui/miscdlgs/optsolver.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit d848dfaa7ce3dc64c5e83f90e1ece69a8171818d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Oct 14 08:41:12 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Oct 14 11:37:34 2024 +0200 cid#1633173 silence Unchecked return value Change-Id: Ic3779f6922f855ad57b2c261696c76a06dac84f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174880 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 1ca966eadc5c..5f75a610def8 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -1238,7 +1238,11 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal ScDocFunc &rFunc = mpDocShell->GetDocFunc(); rFunc.InsertTable(mnCurTab + 1, sNewTabName, false, false); SCTAB nReportTab; - mrDoc.GetTable(sNewTabName, nReportTab); + if (!mrDoc.GetTable(sNewTabName, nReportTab)) + { + SAL_WARN("sc", "Could not get the just inserted table!"); + return false; + } // Used to input data in the new sheet ScAddress aOutputAddress(0, 0, nReportTab);