diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-21 21:55:47 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-21 23:17:24 +0200 |
commit | 89aefcb877567ad3fde2d6ddc4c4f9f620ab2661 (patch) | |
tree | ea68b526180c10c10c717033ed38d171150f8758 | |
parent | ebab5c3cdffd5ef51919ff00cd20654a6abdf966 (diff) |
tdf#120703 (PVS): redundant nullptr check
V668 There is no sense in testing the 'pBackgroundPropertiesPtr' pointer
against null, as the memory was allocated using the 'new' operator.
The exception will be generated in the case of memory allocation error.
Change-Id: I728ffa74ec5e1f1f428224c79bd17c53b3ad3829
Reviewed-on: https://gerrit.libreoffice.org/62150
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | oox/source/ppt/pptshapegroupcontext.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index de8db9b237cd..4caa76b1c1c7 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -109,9 +109,7 @@ ContextHandlerRef PPTShapeGroupContext::onCreateContext( sal_Int32 aElementToken pBackgroundPropertiesPtr->moFillType = XML_solidFill; pBackgroundPropertiesPtr->maFillColor.setSrgbClr(0xFFFFFF); } - if ( pBackgroundPropertiesPtr ) { - pShape->getFillProperties().assignUsed( *pBackgroundPropertiesPtr ); - } + pShape->getFillProperties().assignUsed( *pBackgroundPropertiesPtr ); } pShape->setModelId(rAttribs.getString( XML_modelId ).get()); return new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape ); |