[Libreoffice-commits] core.git: vcl/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 16 14:55:35 UTC 2021


 vcl/source/window/mouse.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c7b9f477f69c317e0482aeee79b1c2f070a1b981
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Fri Jul 16 14:32:36 2021 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Jul 16 16:55:00 2021 +0200

    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 at collabora.com>

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 1c0eaa3ba3cc..e77402ea600e 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -466,7 +466,8 @@ void Window::ReleaseMouse()
     {
         ImplSVData* pSVData = ImplGetSVData();
         pSVData->mpWinData->mpCaptureWin = nullptr;
-        mpWindowImpl->mpFrame->CaptureMouse( false );
+        if (mpWindowImpl && mpWindowImpl->mpFrame)
+            mpWindowImpl->mpFrame->CaptureMouse( false );
         ImplGenerateMouseMove();
     }
 }


More information about the Libreoffice-commits mailing list