framework/source/uielement/toolbarmanager.cxx | 3 +++ vcl/source/window/toolbox2.cxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit 7f863e890640d0924a6e6f85cf99447dcd7836f7 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Apr 13 18:01:46 2016 +0200 Avoid null ToolBox::mpData deref during Frame::close Oh my, whatever the true cause for this SEGV in JunitTest_framework_complex, <http://ci.libreoffice.org/job/lo_tb_master_linux_dbg/6628/console>, processing an incoming URP request > ToolBox::GetMenu() const at vcl/source/window/toolbox2.cxx:1775 > framework::ToolBarManager::ImplClearPopupMenu(ToolBox*) at framework/source/uielement/toolbarmanager.cxx:1309 > framework::ToolBarManager::dispose() at framework/source/uielement/toolbarmanager.cxx:470 > framework::ToolBarWrapper::dispose() at framework/source/uielement/toolbarwrapper.cxx:106 > framework::ToolbarLayoutManager::destroyToolbars() at framework/source/layoutmanager/toolbarlayoutmanager.cxx:654 > framework::ToolbarLayoutManager::reset() at framework/source/layoutmanager/toolbarlayoutmanager.cxx:363 > framework::LayoutManager::implts_reset(bool) at framework/source/layoutmanager/layoutmanager.cxx:413 > framework::LayoutManager::frameAction(com::sun::star::frame::FrameActionEvent const&) at framework/source/layoutmanager/layoutmanager.cxx:2804 > (anonymous namespace)::Frame::implts_sendFrameActionEvent(com::sun::star::frame::FrameAction const&) at framework/source/services/frame.cxx:2953 > (anonymous namespace)::Frame::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1449 > (anonymous namespace)::Frame::close(sal_Bool) at framework/source/services/frame.cxx:1689 > framework::Desktop::impl_closeFrames(bool) at framework/source/services/desktop.cxx:1674 > framework::Desktop::terminate() at framework/source/services/desktop.cxx:238 and the main thread idling in Application::Yield. Change-Id: I41ff8007ee4bbc37473aa5f077ff706b51d31c64 diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 7c324fe..09f754b 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1307,6 +1307,9 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar ) return; ::PopupMenu *pMenu = pToolBar->GetMenu(); + if (pMenu == nullptr) { + return; + } // remove config entries from menu, so we have a clean menu to start with // remove submenu first diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index ff15361..2d1294c 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1772,7 +1772,7 @@ bool ToolBox::IsMenuEnabled() const PopupMenu* ToolBox::GetMenu() const { - return mpData->mpMenu; + return mpData == nullptr ? nullptr : mpData->mpMenu; } void ToolBox::SetMenuButtonHdl( const Link<ToolBox *, void>& rLink ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits