sw/source/core/draw/dcontact.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 28daee8a3252e03a67484dc8d3dd26fd73af4826 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Jul 18 09:11:40 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Jul 18 11:47:40 2022 +0200 cid#1507361 Unchecked dynamic_cast Change-Id: Ie1b5c3796cca07e3f41d5074de5c70c5308a2ab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 1ca90b18eec9..0a4c96b922eb 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1634,7 +1634,7 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) { auto pGetZOrdnerHint = static_cast<const sw::GetZOrderHint*>(&rHint); auto pFormat(dynamic_cast<const SwFrameFormat*>(&rMod)); - if(pFormat->Which() == RES_DRAWFRMFMT) + if (pFormat && pFormat->Which() == RES_DRAWFRMFMT) pGetZOrdnerHint->m_rnZOrder = GetMaster()->GetOrdNum(); } else if (rHint.GetId() == SfxHintId::SwGetObjectConnected)
