summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/cursor.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 3bdd19b08ddf..708fb19793fc 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -193,8 +193,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->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;
}