Mercurial > hg > svcore
diff base/CommandHistory.cpp @ 384:6f6ab834449d spectrogram-cache-rejig
* Merge from trunk
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 11:59:42 +0000 |
parents | dc46851837d6 |
children |
line wrap: on
line diff
--- a/base/CommandHistory.cpp Thu Nov 15 14:03:56 2007 +0000 +++ b/base/CommandHistory.cpp Wed Feb 27 11:59:42 2008 +0000 @@ -216,6 +216,10 @@ CommandHistory::addToCompound(Command *command, bool execute) { // std::cerr << "CommandHistory::addToCompound: " << command->getName().toLocal8Bit().data() << std::endl; + if (!m_currentCompound) { + std::cerr << "CommandHistory::addToCompound: ERROR: no compound operation in progress!" << std::endl; + return; + } if (execute) command->execute(); m_currentCompound->addCommand(command); @@ -227,6 +231,7 @@ if (m_currentCompound) { std::cerr << "CommandHistory::startCompoundOperation: ERROR: compound operation already in progress!" << std::endl; std::cerr << "(name is " << m_currentCompound->getName().toLocal8Bit().data() << ")" << std::endl; + return; } closeBundle(); @@ -240,6 +245,7 @@ { if (!m_currentCompound) { std::cerr << "CommandHistory::endCompoundOperation: ERROR: no compound operation in progress!" << std::endl; + return; } MacroCommand *toAdd = m_currentCompound;