Skip to content

Commit

Permalink
Fix stupid error trying to save empty array. Refs #5397
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Aug 2, 2012
1 parent fed9f6f commit b00a43d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Code/Mantid/Framework/API/src/Run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,13 @@ Kernel::Logger& Run::g_log = Kernel::Logger::get("Run");
// Now the goniometer
m_goniometer.saveNexus(file, GONIOMETER_LOG_NAME);

// Now the histogram bins
file->makeGroup(HISTO_BINS_LOG_NAME, "NXdata", 1);
file->writeData("value", m_histoBins);
file->closeGroup();
// Now the histogram bins, if there are any
if(!m_histoBins.empty())
{
file->makeGroup(HISTO_BINS_LOG_NAME, "NXdata", 1);
file->writeData("value", m_histoBins);
file->closeGroup();
}

// Save all the properties as NXlog
std::vector<Property *> props = m_manager.getProperties();
Expand Down

0 comments on commit b00a43d

Please sign in to comment.