sw/source/uibase/wrtsh/wrtsh1.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 9ad752830f42dfc38f91eb2353b49650a3a48d0a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 4 15:04:03 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Mar 4 22:36:10 2022 +0100 cid#1500637 Explicit null dereferenced Change-Id: I813703287faff25a48aa695ccb9c43bf469354d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130996 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index f267368c65c1..25ab28130d3b 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -2118,7 +2118,8 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq) // comment. if (pFly) { - *GetCurrentShellCursor().GetPoint() = *pAnchor; + if (pAnchor) + *GetCurrentShellCursor().GetPoint() = *pAnchor; SwFrameFormat* pFormat = pFly->GetFormat(); if (pFormat && pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR) {