# HG changeset patch # User Chris Cannam # Date 1203088529 0 # Node ID 9867f99e0bb7b2cf540e22c483a783304332c67e # Parent 98a480c5f41014c06ac3cbbd8b685f328cadff2a * Fix #1894369 1.2pre5 crashes on copying data diff -r 98a480c5f410 -r 9867f99e0bb7 base/CommandHistory.cpp --- a/base/CommandHistory.cpp Wed Feb 13 17:58:44 2008 +0000 +++ b/base/CommandHistory.cpp Fri Feb 15 15:15:29 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;