diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-07 16:45:33 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-07 20:33:55 -0600 |
commit | 57b89ea1c2ff07b53c3cc002e5ec9e52abd0c1bd (patch) | |
tree | 9b7f736811fef6db294c7aabea6697ac35581faf /chart2/source | |
parent | 335a8a84fe6349fd716d4978346cfff9c884dd9b (diff) |
coverity#704563 Unchecked dynamic cast
Change-Id: I314d1110a45275be905c60b36e3e3a560a052272
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/main/DrawCommandDispatch.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index d8d8b956345d..0fab17d472ff 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -176,7 +176,13 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj ) pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) ); - ( dynamic_cast< SdrObjCustomShape* >( pObj ) )->MergeDefaultAttributes( &m_aCustomShapeType ); + + SdrObjCustomShape* pShape(dynamic_cast< SdrObjCustomShape* >( pObj )); + assert(pShape); + if(pShape) + { + pShape->MergeDefaultAttributes( &m_aCustomShapeType ); + } } } } |