vcmi/vcmi — pull request #16 by Haryaalcar (2014-06-08 17:31:01+00:00)
Title: crash in VCAI::completeGoal() fixed

there was a crash in line `for (auto p : lockedHeroes) ` after incorrect modifying of map inside `for`

`lockedHeroes.erase (lockedHeroes.find(p.first)); //is it safe?`
no, it was not :)

Can be reproduced after loading saves:
https://www.dropbox.com/s/jrl4p6mlrj4h17w/completeGoal_crash.vcgm1
https://www.dropbox.com/s/rs1u0ypikhaazi3/completeGoal_crash.vsgm1
and pressing "End turn"