coverity#1158118 Unchecked dynamic_cast

Change-Id: I25cb0dd2d6850565aff8a08e4d3955a497415d93
This commit is contained in:
Caolán McNamara
2014-06-10 15:33:46 +01:00
parent e2de37687c
commit 6d166057c9

View File

@@ -216,8 +216,8 @@ void ChartController::executeDispatch_InsertLegend()
ActionDescriptionProvider::INSERT, SCH_RESSTR( STR_OBJECT_LEGEND )),
m_xUndoManager );
ChartModel* pModel = dynamic_cast<ChartModel*>(getModel().get());
Reference< chart2::XLegend > xLegend = LegendHelper::showLegend( *pModel, m_xCC );
ChartModel& rModel = dynamic_cast<ChartModel&>(*getModel().get());
Reference< chart2::XLegend > xLegend = LegendHelper::showLegend(rModel, m_xCC);
aUndoGuard.commit();
}