Whiteboard: fixed an iterator bug

This commit is contained in:
Gabriel Morin 2010-07-10 06:34:25 +00:00
parent 99919f3a9b
commit 6e8f7c82a3

View file

@ -146,10 +146,14 @@ action_ptr highlight_visitor::get_execute_target()
}
action_ptr highlight_visitor::get_delete_target()
{
action_ptr action;
action_ptr action = action_ptr();
if (owner_unit_)
{
action = *side_actions_->find_last_action_of(*owner_unit_);
side_actions::iterator it = side_actions_->find_last_action_of(*owner_unit_);
if (it != side_actions_->end())
{
action = *it;
}
}
return action;
}