[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 12 00:14:51 UTC 2019


 vcl/source/app/help.cxx |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 435659fd7e401353fc114246813b811190362293
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Dec 11 23:58:08 2019 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Dec 12 01:14:04 2019 +0100

    lok: avoid crash cleaning up help-windows with multiple views.
    
    Change-Id: Ic57018396de7730d9fa4fb3b4803a221cb9678da
    Reviewed-on: https://gerrit.libreoffice.org/84999
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index b7cf9f4d4b6b..784dc3ea86fb 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -573,13 +573,20 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
 void ImplDestroyHelpWindow(ImplSVHelpData& rHelpData, bool bUpdateHideTime)
 {
     VclPtr<HelpTextWindow> pHelpWin = rHelpData.mpHelpWin;
-    if ( pHelpWin )
+    if( pHelpWin )
     {
-        vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow();
-        // find out screen area covered by system help window
-        tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
-        if( pHelpWin->IsVisible() )
-            pWindow->Invalidate( aInvRect );
+        vcl::Window * pParent = pHelpWin->GetParent();
+        if( pParent )
+        {
+            VclPtr<vcl::Window> pWindow( pParent->ImplGetFrameWindow() );
+            if( pWindow )
+            {
+                // find out screen area covered by system help window
+                tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
+                if( pHelpWin->IsVisible() )
+                    pWindow->Invalidate( aInvRect );
+            }
+        }
         rHelpData.mpHelpWin = nullptr;
         rHelpData.mbKeyboardHelp = false;
         pHelpWin->Hide();


More information about the Libreoffice-commits mailing list