sw/source/core/frmedt/feshview.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit e94b113bd4fdd9f6a2604b870b77678e5a3574c8 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Apr 3 10:29:36 2024 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Thu Apr 4 09:47:13 2024 +0200 Check SwDrawContact before use GetUserCall(pObj) can return nullptr Blind fix for: 0 in SwFEShell::GetAnchorId() const () from /opt/collaboraoffice/program/../program/libswlo.so 1 in SwBaseShell::GetState(SfxItemSet&) () from /opt/collaboraoffice/program/../program/libswlo.so Signed-off-by: Szymon Kłos <[email protected]> Change-Id: I3e573678f2cf730f0d32dc235923495abc856974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165737 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index a7e1e2228c12..85639f21fb4b 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2380,6 +2380,8 @@ RndStdIds SwFEShell::GetAnchorId() const break; } SwDrawContact *pContact = static_cast<SwDrawContact*>(GetUserCall(pObj)); + if (!pContact) + continue; RndStdIds nId = pContact->GetFormat()->GetAnchor().GetAnchorId(); if ( nRet == RndStdIds(SHRT_MAX) ) nRet = nId;
