[Libreoffice-commits] core.git: sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 8 19:10:01 UTC 2021


 sc/source/ui/miscdlgs/optsolver.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit ec867a13baaa43791d8bacf4e8c1b96aadb6aa8a
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Aug 8 18:34:35 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Aug 8 21:09:26 2021 +0200

    tdf#143534 Crash in Calc NLP Solver
    
    prevent dialog from being deleted out from underneath
    the code handling the dialog.
    
    Change-Id: Ib1ef05f897901089708188820a3330dbeabc24c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120175
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 3476efaa456b..445c43ab7aba 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -507,6 +507,7 @@ bool ScOptSolverDlg::IsRefInputMode() const
 
 IMPL_LINK(ScOptSolverDlg, BtnHdl, weld::Button&, rBtn, void)
 {
+    auto xKeepAlive = shared_from_this();
     if (&rBtn == m_xBtnSolve.get() || &rBtn == m_xBtnClose.get())
     {
         bool bSolve = ( &rBtn == m_xBtnSolve.get() );


More information about the Libreoffice-commits mailing list