basctl/source/basicide/baside2b.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 9e4825beb82ee68642eca5031ad57fc55d384256 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 23 10:32:53 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 23 13:50:27 2022 +0100 cid#1500613 Dereference after null check Change-Id: I6f02265a4e208ebb66004bd7784e2dc1a50adef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130427 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> 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())