sfx2/source/dialog/infobar.cxx | 8 ++++++-- vcl/source/window/winproc.cxx | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit 3faf9c4a2a5d2f761dc83b942199f55cdbd5f054 Author: Philippe Jung <phil.j...@free.fr> Date: Thu May 7 10:15:46 2015 +0200 Fix a crash in SfxInfoBarWindow Fix a crash that occurs when a locked doc is opened. Ask to open it read-only, then click on Edit the document in the info bar. Used to crash. Change-Id: Ic6e53853345e9e8431cae0eb2408ab0624d92cce diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index ff91cc6..3c2c197 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -283,17 +283,21 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar(const OUString& sId) void SfxInfoBarContainerWindow::removeInfoBar(SfxInfoBarWindow* pInfoBar) { + // Store a VclPtr to the pInfoBar while we remove it from m_pInfoBars + ScopedVclPtr<SfxInfoBarWindow> pTmp(pInfoBar); + + // Remove for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it) { if (pInfoBar == it->get()) { + it->disposeAndClear(); m_pInfoBars.erase(it); break; } } - if (pInfoBar) - pInfoBar->disposeOnce(); + // Resize long nY = 0; for (auto it = m_pInfoBars.begin(); it != m_pInfoBars.end(); ++it) { commit cc444e083c59ffcd73520faf55a28f55cfcb0068 Author: Michael Meeks <michael.me...@collabora.com> Date: Thu May 7 11:08:24 2015 +0100 Hold a reference on the Window while emitting events from vcl backends. Change-Id: I4673dc03c214ca8f5c227a444e182a45f6199b9b diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 6cccd18..30db414 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -2377,11 +2377,14 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow, } } -bool ImplWindowFrameProc( vcl::Window* pWindow, SalFrame* /*pFrame*/, +bool ImplWindowFrameProc( vcl::Window* _pWindow, SalFrame* /*pFrame*/, sal_uInt16 nEvent, const void* pEvent ) { DBG_TESTSOLARMUTEX(); + // Ensure the window survives during this method. + VclPtr<vcl::Window> pWindow( _pWindow ); + bool nRet = false; // #119709# for some unknown reason it is possible to receive events (in this case key events) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits