Do we really need the

if (genstats.size()<j) {

As I said, the try/catch was just something I added while searching, and the 
real fix for this particular crash was the check for

genstats.at(j - 1).miltary_strength.empty())

I don't mind either way though. I expect that these cases will mostly come up 
when loading a savegame, so if the AI decided to attack a bit later because 
initialization isn't ready, no harm done.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1388028/+merge/240357
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1388028.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to