Skip to content

Commit

Permalink
dynamic_cast, setIndexedColors(), coverity issue 1075808, re #11152
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 22, 2015
1 parent e95ab9e commit 9c1a9b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Code/Mantid/MantidPlot/src/Graph.cpp
Expand Up @@ -4981,7 +4981,11 @@ void Graph::setIndexedColors()
PlotCurve *c = dynamic_cast<PlotCurve*>(it);
if (c->type() == ErrorBars)
{
QwtErrorPlotCurve *er = dynamic_cast<QwtErrorPlotCurve*>(it); // QtiPlot: ErrorBarsCurve *er = (ErrorBarsCurve *) it;
// QtiPlot: ErrorBarsCurve *er = (ErrorBarsCurve *) it;
QwtErrorPlotCurve *er = dynamic_cast<QwtErrorPlotCurve*>(it);
if (!er)
continue;

DataCurve* mc = er->masterCurve();
if (mc)
er->setColor(mc->pen().color());
Expand Down

0 comments on commit 9c1a9b5

Please sign in to comment.