[Libreoffice-commits] core.git: oox/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 11 18:08:17 UTC 2021


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

New commits:
commit 4dc89ebacb655e22f2ac417c8260d4df3e845fd1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 11 17:40:13 2021 +0100
Commit:     Caolán McNamara <caolanm at 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 <caolanm at 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;


More information about the Libreoffice-commits mailing list