diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-15 13:04:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-15 17:55:35 +0200 |
commit | 5bb402a796b26767459c8e1e9d2f24796468879b (patch) | |
tree | 65109223a15f2293444a0e8bf3e54f3dc8826d5f /editeng | |
parent | 285be48ac7e36b56b0ce030aa6e2d10196afd53b (diff) |
don't crash if not hosted in a vcl::Window
Change-Id: I6c1e774461db5d144d09de7d5c532407f1c572b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104373
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index b0f229ad9cef..ed8bd065dca2 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -492,6 +492,8 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bActivat if (pImpEditView->mpViewShell && !bActivate) { + if (!pImpEditView->pOutWin) + return; VclPtr<vcl::Window> pParent = pImpEditView->pOutWin->GetParentWithLOKNotifier(); if (pParent && pParent->GetLOKWindowId() != 0) return; @@ -508,6 +510,8 @@ void EditView::HideCursor(bool bDeactivate) if (pImpEditView->mpViewShell && !bDeactivate) { + if (!pImpEditView->pOutWin) + return; VclPtr<vcl::Window> pParent = pImpEditView->pOutWin->GetParentWithLOKNotifier(); if (pParent && pParent->GetLOKWindowId() != 0) return; |