summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-23 10:32:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-23 13:50:27 +0100
commit9e4825beb82ee68642eca5031ad57fc55d384256 (patch)
treefa257980ae85abb1a29782360acc9522909aff59 /basctl
parentf7b99812c088b1738f25fb57a821b90b8520d8dd (diff)
cid#1500613 Dereference after null check
Change-Id: I6f02265a4e208ebb66004bd7784e2dc1a50adef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130427 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index eb038f69d86f..00c5dce2f185 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -467,8 +467,9 @@ void EditorWindow::MouseButtonUp( const MouseEvent &rEvt )
void EditorWindow::MouseButtonDown( const MouseEvent &rEvt )
{
GrabFocus();
- if ( pEditView )
- pEditView->MouseButtonDown( rEvt );
+ if (!pEditView)
+ return;
+ pEditView->MouseButtonDown(rEvt);
if( pCodeCompleteWnd->IsVisible() )
{
if (pEditView->GetSelection() != pCodeCompleteWnd->GetTextSelection())