vcl: avoid accessing null member on unloading views

Change-Id: If4e416c7257c861b9e13352b3329d9719b159e61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87830
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88538
Tested-by: Jenkins
This commit is contained in:
Ashod Nakashian
2020-02-02 14:37:38 -05:00
committed by Andras Timar
parent 88d54208f1
commit c70d31a274

View File

@@ -201,8 +201,9 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
// show the cursor, if there is an active window and the cursor
// has been selected in this window
pWindow = Application::GetFocusWindow();
if ( !pWindow || !pWindow->mpWindowImpl || (pWindow->mpWindowImpl->mpCursor != this) || pWindow->mpWindowImpl->mbInPaint
|| !pWindow->mpWindowImpl->mpFrameData->mbHasFocus )
if (!pWindow || !pWindow->mpWindowImpl || (pWindow->mpWindowImpl->mpCursor != this)
|| pWindow->mpWindowImpl->mbInPaint
|| !pWindow->mpWindowImpl->mpFrameData->mbHasFocus)
pWindow = nullptr;
}