Skip to content

Commit

Permalink
dynamic_cast, chooseLabelsFont, coverity issues 1075746, re #11151
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 21, 2015
1 parent e1152f9 commit bb97b77
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/Mantid/MantidPlot/src/PlotDialog.cpp
Expand Up @@ -3023,8 +3023,12 @@ void PlotDialog::chooseLabelsFont()
if (!item || item->type() != CurveTreeItem::PlotCurveTreeItem)
return;

QwtPlotItem *i = dynamic_cast<CurveTreeItem*>(item)->plotItem();
Graph *graph = dynamic_cast<CurveTreeItem*>(item)->graph();
CurveTreeItem* ctit = dynamic_cast<CurveTreeItem*>(item);
if (!ctit)
return;

QwtPlotItem *i = ctit->plotItem();
Graph *graph = ctit->graph();
if (!i || !graph)
return;

Expand Down

0 comments on commit bb97b77

Please sign in to comment.