segfault on a friendly visit
Status: Beta
Brought to you by:
afletdinov
Problem: latest build segfaults on visiting a friendly castle ( not owned by the current color ).
Reason: in game_startgame.cpp/Game::OpenCastleDialog(), KingdomCastles::const_iterator it goes all the way to myCastles.end() . ( Willattach the patch and the stack trace; a debug core file and a binary for post-mortem study can be uploaded on request (fairly big). )
Suggested fix ( might not be the best one, but it fixes the problem ) -- change line 145 as follows:
if(castle.isFriends(conf.CurrentColor())) { // (*it)->OpenDialog(true, need_fade); castle.OpenDialog(true, need_fade); }
adding gdb backtrace ..