summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-11 23:58:08 +0000
committerDennis Francis <dennisfrancis.in@gmail.com>2020-05-26 23:17:26 +0530
commitde4dddbf8df57903b686d8555eb95a01a323cfaf (patch)
tree1315bbacb2500afe438686b522e0424a8f00a0d0 /vcl
parent8e05f9fe116634e9860164e99325ee3c87449c7e (diff)
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@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 435659fd7e401353fc114246813b811190362293)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/help.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index f88c11f1f833..5ad273cb2bbb 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -562,13 +562,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();