Skip to content

Commit

Permalink
dynamic_cast, setIndexedColors(), coverity issue 1075810, re #11152
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 22, 2015
1 parent 53e92d1 commit ab44e13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/Graph.cpp
Expand Up @@ -4944,7 +4944,7 @@ void Graph::setIndexedColors()
continue;

PlotCurve *c = dynamic_cast<PlotCurve*>(it);
if (c->type() == ErrorBars)
if (!c || c->type() == ErrorBars)
continue;

QPen pen = c->pen();
Expand Down

0 comments on commit ab44e13

Please sign in to comment.