Kaydet (Commit) 85344383 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1158136 Unchecked dynamic_cast

Change-Id: I8d4e7c497430faacd0d8f1138b9af8b2f11127a0
üst 4f4a21c8
...@@ -189,7 +189,8 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel ...@@ -189,7 +189,8 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( m_bIsCrossingAxisIsCategoryAxis ) if( m_bIsCrossingAxisIsCategoryAxis )
{ {
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get()); 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 ...@@ -197,8 +198,11 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY ) if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY )
{ {
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get()); ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, *pModel ); if (pModel)
m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories(); {
ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, *pModel );
m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment