Bug fix - hang on cygwin when task updated.

- Fixed bug that caused a hang on cygwin, when a task with multiple
  annotations was edited (thanks to Joe Pulliam).
This commit is contained in:
Paul Beckingham 2009-11-09 22:35:51 -05:00
parent 5b96dbbce8
commit 64bc2a165a
2 changed files with 9 additions and 3 deletions

View file

@ -441,10 +441,14 @@ void Task::addAnnotation (const std::string& description)
void Task::removeAnnotations ()
{
// Erase old annotations.
Record::iterator i;
for (i = this->begin (); i != this->end (); ++i)
Record::iterator i = this->begin ();
while (i != this->end ())
{
if (i->first.substr (0, 11) == "annotation_") // No i18n
this->erase (i);
this->erase (i++);
else
i++;
}
}
////////////////////////////////////////////////////////////////////////////////