Skip to content

Commit

Permalink
Move null pointer checks to more sensible place.
Browse files Browse the repository at this point in the history
Refs #7994
  • Loading branch information
martyngigg committed Sep 30, 2013
1 parent 8e822ac commit 0eaa6a8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2305,17 +2305,13 @@ MultiLayer* MantidUI::plotBin(const QString& wsName, const QList<int> & binsList
}

Table *t = createTableFromBins(wsName, ws, binsList, errors);
if(!t) return NULL;
t->confirmClose(false);
t->setAttribute(Qt::WA_QuitOnClose);
MultiLayer* ml(NULL);
if( !t )
{
QApplication::restoreOverrideCursor();
return ml;
}

// TODO: Use the default style instead of a line if nothing is passed into this method
ml = appWindow()->multilayerPlot(t,t->colNames(),style);
MultiLayer *ml = appWindow()->multilayerPlot(t,t->colNames(),style);
if(!ml) return NULL;
m->setBinGraph(ml,t);
ml->confirmClose(false);
QApplication::restoreOverrideCursor();
Expand Down

0 comments on commit 0eaa6a8

Please sign in to comment.