oox/source/shape/WpsContext.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4dc89ebacb655e22f2ac417c8260d4df3e845fd1
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Jul 11 17:40:13 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Jul 11 20:07:44 2021 +0200

    cid#1487030 Explicit null dereferenced
    
    if alternatively we shouldn't check for null then presumably
    ShapeContext ctor should either
    
    Change-Id: Ic61cdc21de0c878a0f3cb45cbb60743dcb400368
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118753
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 834dc9f5a730..77e744d31fc9 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -37,7 +37,8 @@ WpsContext::WpsContext(ContextHandler2Helper const& rParent, 
uno::Reference<draw
     : ShapeContext(rParent, pMasterShapePtr, pShapePtr)
     , mxShape(std::move(xShape))
 {
-    mpShapePtr->setWps(true);
+    if (mpShapePtr)
+        mpShapePtr->setWps(true);
 }
 
 WpsContext::~WpsContext() = default;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to