[Libreoffice-commits] core.git: formula/source include/formula
Julien Nabet
serval2412 at yahoo.fr
Thu May 14 02:20:25 PDT 2015
formula/source/ui/dlg/formula.cxx | 11 +++++++++--
include/formula/formula.hxx | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 844b7287a4ccd8e3d5e458bb1dc6c52e71322b01
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu May 14 01:36:33 2015 +0200
tdf#91273: Crash when closing formula wizard (cancel or ok)
warn:legacy.osl:3927:1:vcl/source/window/window.cxx:271: Window ( 7VclVBox ()) with live children destroyed: N7formula7ParaWinE ()
I took example from http://cgit.freedesktop.org/libreoffice/core/commit/?id=da49275807c8cf1dd7362a531f321f9f756e82d1
+ test existence of m_pImpl for FormulaDlg::PreNotify
Change-Id: I580aa7be79e1743fc528fd414a0ae581c0cb0c87
Reviewed-on: https://gerrit.libreoffice.org/15726
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 89ec835..425593d 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1749,7 +1749,13 @@ FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
SetText(m_pImpl->aTitle1);
}
-FormulaDlg::~FormulaDlg() {}
+FormulaDlg::~FormulaDlg() {disposeOnce();}
+
+void FormulaDlg::dispose()
+{
+ m_pImpl.reset();
+ SfxModelessDialog::dispose();
+}
void FormulaDlg::Update(const OUString& _sExp)
{
@@ -1823,7 +1829,8 @@ void FormulaDlg::SetFocusWin(vcl::Window *pWin,const OString& nUniqueId)
bool FormulaDlg::PreNotify( NotifyEvent& rNEvt )
{
- m_pImpl->PreNotify( rNEvt );
+ if (m_pImpl)
+ m_pImpl->PreNotify( rNEvt );
return SfxModelessDialog::PreNotify(rNEvt);
}
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index 07720d4..658e532 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -97,6 +97,7 @@ public:
, IFunctionManager* _pFunctionMgr
, IControlReferenceHandler* _pDlg = NULL );
virtual ~FormulaDlg();
+ virtual void dispose() SAL_OVERRIDE;
private:
::std::unique_ptr<FormulaDlg_Impl> m_pImpl;
More information about the Libreoffice-commits
mailing list