Code review comment for lp:~widelands-dev/widelands/bug-1388028

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

« Back to merge proposal