From 2bad2224090eb2802111760ec83db230aeca0616 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 29 Apr 2024 11:59:09 +0100 Subject: futile to null check here if we deref afterwards anyway MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I994b276ad39b09547cb1dbd3710daf519c5f5c66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166864 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/core/access/acctable.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 3c8beaf9a0a4..d58a8b74b1ae 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -611,9 +611,7 @@ SwAccessibleTable::SwAccessibleTable( SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrame ) { const SwFrameFormat* pFrameFormat = pTabFrame->GetFormat(); - if(pFrameFormat) - StartListening(const_cast(pFrameFormat)->GetNotifier()); - + StartListening(const_cast(pFrameFormat)->GetNotifier()); SetName( pFrameFormat->GetName() + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); const OUString sArg1( static_cast< const SwTabFrame * >( GetFrame() )->GetFormat()->GetName() ); @@ -1620,8 +1618,7 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SolarMutexGuard aGuard; const SwFrameFormat* pFrameFormat = pTabFrame->GetFormat(); - if(pFrameFormat) - StartListening(const_cast(pFrameFormat)->GetNotifier()); + StartListening(const_cast(pFrameFormat)->GetNotifier()); const OUString aName = pFrameFormat->GetName() + "-ColumnHeaders"; SetName( aName + "-" + OUString::number( pTabFrame->GetPhyPageNum() ) ); -- cgit