diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 10:41:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 13:51:20 +0100 |
commit | e68faf60e59ad82fa23a0fb18bf80847788589a7 (patch) | |
tree | 9e34d8a6e52d7f9b84d658da38adfe1b801c400e /basctl/source/basicide/moduldlg.cxx | |
parent | 03aff21eafc19e2e02bfdb0bf541f64eb5942044 (diff) |
cid#1500494 Explicit null dereferenced
Change-Id: I543cc7b12e3517e26bd57463dc20c97c5498df55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130430
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl/source/basicide/moduldlg.cxx')
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index baa9faae255a..114a9e2062fa 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -843,6 +843,8 @@ void ObjectPage::DeleteCurrent() if (!m_xBasicBox->get_cursor(xCurEntry.get())) xCurEntry.reset(); DBG_ASSERT( xCurEntry, "No current entry!" ); + if (!xCurEntry) + return; EntryDescriptor aDesc( m_xBasicBox->GetEntryDescriptor( xCurEntry.get() ) ); const ScriptDocument& aDocument( aDesc.GetDocument() ); DBG_ASSERT( aDocument.isAlive(), "ObjectPage::DeleteCurrent: no document!" ); |