coverity#1158115 Unchecked dynamic_cast

Change-Id: Ic37180d32f1308a5065f547584046e31dae88ea0
This commit is contained in:
Caolán McNamara
2014-06-10 15:35:33 +01:00
parent 5cbd7b68b9
commit 23f6f4fd1f

View File

@@ -950,8 +950,8 @@ void ChartController::impl_switchDiagramPositioningToExcludingPositioning()
ActionDescriptionProvider::POS_SIZE,
ObjectNameProvider::getName( OBJECTTYPE_DIAGRAM)),
m_xUndoManager );
ChartModel* pModel = dynamic_cast<ChartModel*>(m_aModel->getModel().get());
if( DiagramHelper::switchDiagramPositioningToExcludingPositioning( *pModel, true, true ) )
ChartModel& rModel = dynamic_cast<ChartModel&>(*m_aModel->getModel().get());
if (DiagramHelper::switchDiagramPositioningToExcludingPositioning(rModel, true, true))
aUndoGuard.commit();
}