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>
This commit is contained in:
Caolán McNamara
2022-02-23 13:51:20 +01:00
parent 03aff21eaf
commit e68faf60e5
+2
View File
@@ -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!" );