From 3fee58e0194ccc375a6fd3fc35197229df2518b0 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Fri, 4 Dec 2020 12:24:27 +0100 Subject: Avoid crash on closing docking window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9f5ac4fae9e37e3eece8ad8bd2d6505514517d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107215 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- vcl/source/window/dockmgr.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vcl') diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 45708e8d709f..ee3ae7261221 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -376,6 +376,10 @@ void DockingManager::RemoveWindow( const vcl::Window *pWindow ) { if( (*it)->mpDockingWindow == pWindow ) { + // deleting wrappers calls set of actions which may want to use + // wrapper we want to delete - avoid crash using temporary owner + // while erasing + auto pTemporaryOwner = std::move(*it); mvDockingWindows.erase( it ); break; } -- cgit