summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-04 10:37:51 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-04 13:13:34 +0100
commit409746b90af5ad9b07f1a7df1005279f8dede1ba (patch)
tree129a4732816fdf25584fcc2e8a742051f4e093b2 /sw
parent6c50e73334444194c1024f834ca0e0f5ff666d40 (diff)
cid#1591484 Dereference after null check
Change-Id: Id3ea18587cf3bccd808de48af6cd4a502d67cef8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162973 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/trvlfrm.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 77ebde80cfe1..8d8da2a3b724 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -234,13 +234,16 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint,
}
}
+ SAL_WARN_IF(!pCnt, "sw.layout", "Cursor is gone to a Black hole");
+ if (!pCnt)
+ return false;
+
// GetContentPos may have modified pCMS
if ( pCMS && pCMS->m_bStop )
return false;
bool bTextRet = false;
- OSL_ENSURE( pCnt, "Cursor is gone to a Black hole" );
if( pCMS && pCMS->m_pFill && pCnt->IsTextFrame() )
bTextRet = pCnt->GetModelPositionForViewPoint( &aTextPos, rPoint, pCMS );
else