summaryrefslogtreecommitdiff
path: root/vcl/source/app/help.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-11 23:58:08 +0000
committerAshod Nakashian <ashnakash@gmail.com>2019-12-22 22:21:08 +0100
commit0b7b2026b0e0a07931da933d5a144d2c00113538 (patch)
tree77db1ae1aec6e839531cc035d3798caa5a072ac5 /vcl/source/app/help.cxx
parent24e7208306fa1c60eb0a0cee5c49b6454cad9df3 (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) Reviewed-on: https://gerrit.libreoffice.org/85350 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'vcl/source/app/help.cxx')
-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 8f8efdd38eb5..b5a7cb4cc057 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();