diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2021-07-16 14:32:36 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-07-20 11:13:13 +0200 |
commit | 751053e8c998960fbe53f498eb06965b48ea7885 (patch) | |
tree | b5e4c61e80ee1c057ce00098d028191b38929ada | |
parent | 557905766a78fdadadb45f1faae282ae37594ff4 (diff) |
vcl: check mpWindowImpl for nullptr.
Crash in calc's mouse capture / end tracking.
Change-Id: If5b4cded8ebfc04d1fcf645a7b74184532ab2338
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119034
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit c7b9f477f69c317e0482aeee79b1c2f070a1b981)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119037
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | vcl/source/window/mouse.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index b2f978dbe7cf..d49c7f3dbda7 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -465,7 +465,8 @@ void Window::ReleaseMouse() { ImplSVData* pSVData = ImplGetSVData(); pSVData->mpWinData->mpCaptureWin = nullptr; - mpWindowImpl->mpFrame->CaptureMouse( false ); + if (mpWindowImpl && mpWindowImpl->mpFrame) + mpWindowImpl->mpFrame->CaptureMouse( false ); ImplGenerateMouseMove(); } } |