summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-11 23:58:08 +0000
committerMichael Meeks <michael.meeks@collabora.com>2019-12-12 01:14:04 +0100
commit435659fd7e401353fc114246813b811190362293 (patch)
treefbcb242dbbc0ce130e13f3d8ec1fd892671016c3 /vcl
parentd4c52ebce80e6ea9dbfa0ca47b50272fab71c546 (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>
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 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();