diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2020-02-02 14:37:38 -0500 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-05-23 11:21:41 +0200 |
commit | 25ba49d3de229f940fa7271beb0a84c2ff297618 (patch) | |
tree | b5b76b915f1b3692979e1ad695ce5122701c5993 /vcl | |
parent | e901a1e3a6914da49cc69fbb898cf2df1e9e92c7 (diff) |
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>
(cherry picked from commit 9ec3d637c1c99c729da67eafc375efce1cc7f026)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/cursor.cxx | 5 |
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; } |