cid#1634809 Null pointer dereferences

and

cid#1634807 Null pointer dereferences

Change-Id: I9a100651a744cb77ff89769e8c98afcfb771f593
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176563
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
This commit is contained in:
Jonathan Clark 2024-11-14 00:32:55 -07:00
parent 08aa3c4fa7
commit cf42d70e8c

View file

@ -3787,11 +3787,11 @@ Point ImpEditEngine::GetDocPosTopLeft( sal_Int32 nParagraph )
const ParaPortion* pPPortion = maParaPortionList.SafeGetObject(nParagraph);
DBG_ASSERT( pPPortion, "Paragraph not found: GetWindowPosTopLeft" );
auto stMetrics = GetFontUnitMetrics(pPPortion->GetNode());
Point aPoint;
if ( pPPortion )
{
auto stMetrics = GetFontUnitMetrics(pPPortion->GetNode());
// If someone calls GetLineHeight() with an empty Engine.
DBG_ASSERT(IsFormatted() || !IsFormatting(), "GetDocPosTopLeft: Doc not formatted - unable to format!");
if (!IsFormatted())