Skip to content

Commit

Permalink
dynamic_casts, showAxis(), coverity issue 1075785, re #11152
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 22, 2015
1 parent f769b73 commit 0ff0f9e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Code/Mantid/MantidPlot/src/Graph.cpp
Expand Up @@ -591,11 +591,16 @@ void Graph::showAxis(int axis, int type, const QString& formatInfo, Table *table
if (!axisOn)
return;

QList<int> majTicksTypeList = d_plot->getMajorTicksType();
QList<int> minTicksTypeList = d_plot->getMinorTicksType();

QwtScaleWidget *scale = dynamic_cast<QwtScaleWidget *>(d_plot->axisWidget(axis));
if (!scale)
return;

ScaleDraw *sd = dynamic_cast<ScaleDraw *>(d_plot->axisScaleDraw(axis));
if (!sd)
return;

QList<int> majTicksTypeList = d_plot->getMajorTicksType();
QList<int> minTicksTypeList = d_plot->getMinorTicksType();

if (d_plot->axisEnabled (axis) == axisOn &&
majTicksTypeList[axis] == majTicksType &&
Expand Down

0 comments on commit 0ff0f9e

Please sign in to comment.