diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-17 10:53:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-17 15:00:00 +0200 |
commit | 05cdcd8c4ecc21be45b4199e67028b43dc89aac9 (patch) | |
tree | ed2d6cf158f149370402f0ec40df98b360def2ae | |
parent | f2180bdc20c76ca70eb39dcddfb7e0da98315aba (diff) |
tdf#134523 variable is null during reentrant calls
Change-Id: Ic7aef7b406bd77d242870cbd04e55264cad9b7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98947
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 90f9caf76812..42a9a8b16fbd 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -279,7 +279,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const vcl::Wi { for( const auto& xWrapper : mvDockingWindows ) { - if( xWrapper->mpDockingWindow == pWindow ) + if (xWrapper && xWrapper->mpDockingWindow == pWindow) return xWrapper.get(); } return nullptr; @@ -385,7 +385,8 @@ void DockingManager::RemoveWindow( const vcl::Window *pWindow ) { for( auto it = mvDockingWindows.begin(); it != mvDockingWindows.end(); ++it ) { - if( (*it)->mpDockingWindow == pWindow ) + const auto& xWrapper = *it; + if (xWrapper && xWrapper->mpDockingWindow == pWindow) { mvDockingWindows.erase( it ); break; |