summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-11 17:40:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-07-11 20:07:44 +0200
commit4dc89ebacb655e22f2ac417c8260d4df3e845fd1 (patch)
tree8adb9f0246471c6c8d05c97debe18a26e7e31d9b /oox
parent83a235450e6bf3c671ab9a1710e92a356d4d2052 (diff)
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@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/shape/WpsContext.cxx3
1 files changed, 2 insertions, 1 deletions
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;