Skip to content

Commit

Permalink
Refs #4249. Fix for crash with LoadEmptyInstrument/makeEventWorkspace
Browse files Browse the repository at this point in the history
The FitPropertyBrowser also crashed when fed an event workspace that has
no X bounds. Fix for this situation.
  • Loading branch information
martyngigg committed Dec 2, 2011
1 parent 0d80c20 commit 0417a47
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ void FitPropertyBrowser::setWorkspaceName(const QString& wsName)
if (mws)
{
size_t wi = static_cast<size_t>(workspaceIndex());
if (wi < mws->getNumberHistograms())
if (wi < mws->getNumberHistograms() && !mws->readX(wi).empty())
{
setStartX(mws->readX(wi).front());
setEndX(mws->readX(wi).back());
Expand Down

0 comments on commit 0417a47

Please sign in to comment.