[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 17 13:00:48 UTC 2020
vcl/source/window/dockmgr.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 05cdcd8c4ecc21be45b4199e67028b43dc89aac9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 17 10:53:25 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 17 15:00:00 2020 +0200
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 at redhat.com>
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;
More information about the Libreoffice-commits
mailing list