Skip to content

Commit

Permalink
Re #5167. Temporary fix for crash when showing 2D workspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Sep 4, 2012
1 parent b01cd5d commit 4a3753a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,8 @@ void SliceViewer::updateDisplay(bool resetAxes)
m_spect->setData(*m_data);
m_spect->itemChanged();
m_plot->replot();
m_peaksPresenter->updateWithSlicePoint(m_dimWidgets[2]->getSlicePoint());
if ( m_dimWidgets.size() > 2 ) // Temporary fix for crash when displaying Workspace2D (where m_dimWidgets only has 2 elements)
m_peaksPresenter->updateWithSlicePoint(m_dimWidgets[2]->getSlicePoint());

// Send out a signal
emit changedSlicePoint(m_slicePoint);
Expand Down

0 comments on commit 4a3753a

Please sign in to comment.