Skip to content

Commit

Permalink
Refs #11094 Resolve Coverity issues in defineErrorBars
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Feb 16, 2015
1 parent f2d97c7 commit 9e97a67
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -3895,7 +3895,11 @@ void ApplicationWindow::defineErrorBars(const QString& name, int type, const QSt
if (!w)
return;

Graph* g = dynamic_cast<MultiLayer*>(w)->activeGraph();
auto ml = dynamic_cast<MultiLayer*>(w);
if(!ml)
return;

Graph* g = ml->activeGraph();
if (!g)
return;

Expand All @@ -3913,6 +3917,9 @@ void ApplicationWindow::defineErrorBars(const QString& name, int type, const QSt
}

DataCurve *master_curve = dynamic_cast<DataCurve *>(g->curve(name));
if(!master_curve)
return;

QString xColName = master_curve->xColumnName();
if (xColName.isEmpty())
return;
Expand Down

0 comments on commit 9e97a67

Please sign in to comment.