sc/inc/validat.hxx                  |    2 +-
 sc/source/core/data/validat.cxx     |    2 +-
 sc/source/ui/miscdlgs/optsolver.cxx |   11 +++++++----
 3 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 9cba5a740eb07d4a9dacfc7d8eee9f6e2a006ca7
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Jan 18 11:19:02 2025 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Jan 18 20:36:03 2025 +0100

    cid#1640473 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Id8e440ea08e2d6a853e870dc0161d30e63b75cc9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180436
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index 863397f3ca57..365cc3aca074 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -160,7 +160,7 @@ public:
 
                     // TRUE -> break
     void DoError(weld::Window* pParent, const OUString& rInput, const 
ScAddress& rPos,
-                 std::function<void(bool forget)> callback) const;
+                 const std::function<void(bool forget)>& callback) const;
     void DoCalcError( ScFormulaCell* pCell ) const;
 
     bool IsEmpty() const;
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 744cee56adeb..fa47d68c63b7 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -374,7 +374,7 @@ IMPL_STATIC_LINK_NOARG(ScValidationData, 
InstallLOKNotifierHdl, void*, vcl::ILib
     // true -> abort
 
 void ScValidationData::DoError(weld::Window* pParent, const OUString& rInput, 
const ScAddress& rPos,
-                               std::function<void(bool forget)> callback) const
+                               const std::function<void(bool forget)>& 
callback) const
 {
     if ( eErrorStyle == SC_VALERR_MACRO ) {
         DoMacro(rPos, rInput, nullptr, pParent);
commit f74160c617667a25dba7fdbfb18583d12c16e991
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Jan 18 11:17:45 2025 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Jan 18 20:35:52 2025 +0100

    cid#1640469 Dereference null return value
    
    Change-Id: Ib115c3ee73a0124d9d6a3c895722c89158da2d22
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180435
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/miscdlgs/optsolver.cxx 
b/sc/source/ui/miscdlgs/optsolver.cxx
index 8adb033b3cac..cde2774153bc 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -1355,10 +1355,13 @@ bool ScOptSolverDlg::CallSolver()       // return true 
-> close dialog after cal
             }
 
             // Disable grid lines in the sensitivity report
-            ScViewData& aData = 
ScTabViewShell::GetActiveViewShell()->GetViewData();
-            aData.SetTabNo(nReportTab);
-            aData.SetShowGrid(false);
-            aData.SetTabNo(mnCurTab);
+            if (ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell())
+            {
+                ScViewData& rData = pViewSh->GetViewData();
+                rData.SetTabNo(nReportTab);
+                rData.SetShowGrid(false);
+                rData.SetTabNo(mnCurTab);
+            }
         }
     }
 

Reply via email to