Mercurial > hg > svcore
changeset 382:9867f99e0bb7 sv1-v1.2
* Fix #1894369 1.2pre5 crashes on copying data
author | Chris Cannam |
---|---|
date | Fri, 15 Feb 2008 15:15:29 +0000 |
parents | 98a480c5f410 |
children | 9b35a1731c3d |
files | base/CommandHistory.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;