summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx8
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 );
+ }
}
}
}