diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-10 10:32:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-10 11:36:30 +0000 |
commit | f8c8d6131334e4723a50147348a6e7d049be2f89 (patch) | |
tree | 1bbf1e4013e3c126fd644c041b78b9a5f0e77161 | |
parent | 997b3c5f7b6cc303bb2802afe5bd777b8f0a6056 (diff) |
coverity#736008 Dereference after null check
Change-Id: I87977322458b6f22816bdfefb44795609c8159a4
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index acca56285387..3a20ad8bfd8f 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -466,13 +466,15 @@ SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( void XMLShapeImportHelper::SetStylesContext(SvXMLStylesContext* pNew) { mpStylesContext = pNew; - mpStylesContext->AddRef(); + if (mpStylesContext) + mpStylesContext->AddRef(); } void XMLShapeImportHelper::SetAutoStylesContext(SvXMLStylesContext* pNew) { mpAutoStylesContext = pNew; - mpAutoStylesContext->AddRef(); + if (mpAutoStylesContext) + mpAutoStylesContext->AddRef(); } SvXMLShapeContext* XMLShapeImportHelper::CreateGroupChildContext( |