summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-10 15:33:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-10 16:08:07 +0100
commit6d166057c95f11f306fb1ccc5730af5b0b2f361f (patch)
treef788f80a6fe49078a268593389e0982dadb258ba /chart2
parente2de37687c2e68706d2093e19d1b93cec02f0d83 (diff)
coverity#1158118 Unchecked dynamic_cast
Change-Id: I25cb0dd2d6850565aff8a08e4d3955a497415d93
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController_Insert.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index dff59c8d33ee..3abb851ab976 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -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();
}