coverity#1158136 Unchecked dynamic_cast

Change-Id: I8d4e7c497430faacd0d8f1138b9af8b2f11127a0
This commit is contained in:
Caolán McNamara
2014-01-25 20:32:06 +00:00
parent 4f4a21c899
commit 8534438397

View File

@@ -189,7 +189,8 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( m_bIsCrossingAxisIsCategoryAxis )
{
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
m_aCategories = DiagramHelper::getExplicitSimpleCategories( *pModel );
if (pModel)
m_aCategories = DiagramHelper::getExplicitSimpleCategories( *pModel );
}
}
@@ -197,8 +198,11 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY )
{
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, *pModel );
m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
if (pModel)
{
ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, *pModel );
m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
}
}
}
}