From e68faf60e59ad82fa23a0fb18bf80847788589a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 23 Feb 2022 10:41:42 +0000 Subject: [PATCH] cid#1500494 Explicit null dereferenced MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I543cc7b12e3517e26bd57463dc20c97c5498df55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130430 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- basctl/source/basicide/moduldlg.cxx | 2 ++ 1 file changed, 2 insertions(+) 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!" );