tdf#163486: PVS: recurring check

V571: Recurring check. The 'xObj' condition was already verified in line 809.
Change-Id: I4b782c9601893ad91598382ea2f999cbd46df75b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175104
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli 2024-10-17 22:26:47 +02:00
parent d203201261
commit 104cae64df

View file

@ -809,14 +809,11 @@ SdrEndTextEditKind View::SdrEndTextEdit(bool bDontDeleteReally)
eKind = SdrEndTextEditKind::Unchanged;
}
}
else if( xObj && xObj->IsEmptyPresObj() )
else if( xObj && xObj->IsEmptyPresObj() && xObj->HasText() )
{
if( xObj && xObj->HasText() )
{
SdrPage* pPage = xObj->getSdrPageFromSdrObject();
if( !pPage || !pPage->IsMasterPage() )
xObj->SetEmptyPresObj( false );
}
SdrPage* pPage = xObj->getSdrPageFromSdrObject();
if( !pPage || !pPage->IsMasterPage() )
xObj->SetEmptyPresObj( false );
}
GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(