basctl/source/basicide/moduldlg.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit e68faf60e59ad82fa23a0fb18bf80847788589a7 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 23 10:41:42 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 23 13:51:20 2022 +0100 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 <caol...@redhat.com> 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!" );