fixed crash on startup (CVS internal).
Fixed crash when cancelling loading of a multiplayer game.
This commit is contained in:
parent
03aef1d69c
commit
1771a8c43c
3 changed files with 8 additions and 6 deletions
|
@ -1462,11 +1462,10 @@ void display::draw_footstep(const gamemap::location& loc, int xloc, int yloc)
|
|||
const SDL_Rect& rect = map_area();
|
||||
static std::string str(1,'x');
|
||||
str[0] = '0' + route_.move_left + 1;
|
||||
const SDL_Rect& text_area =
|
||||
font::draw_text(NULL,rect,18,text_colour,str,0,0);
|
||||
const SDL_Rect& text_area = font::draw_text(NULL,map_area(),18,text_colour,str,0,0);
|
||||
const int x = xloc + int(zoom_/2.0) - text_area.w/2;
|
||||
const int y = yloc + int(zoom_/2.0) - text_area.h/2;
|
||||
font::draw_text(this,rect,18,text_colour,str,x,y);
|
||||
font::draw_text(this,map_area(),18,text_colour,str,x,y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,9 @@ int play_multiplayer(display& disp, game_data& units_data, config cfg,
|
|||
//Connector
|
||||
mp_connect connector(disp, name_entry.text(), cfg, units_data, state);
|
||||
|
||||
connector.load_map(maps_menu.selection(), cur_turns, cur_villagegold, fog_game.checked(), shroud_game.checked());
|
||||
const int res = connector.load_map(maps_menu.selection(), cur_turns, cur_villagegold, fog_game.checked(), shroud_game.checked());
|
||||
if(res == -1)
|
||||
return -1;
|
||||
|
||||
const network::manager net_manager;
|
||||
const network::server_manager server_man(15000,server);
|
||||
|
|
|
@ -241,8 +241,9 @@ bool theme::set_resolution(const SDL_Rect& screen)
|
|||
}
|
||||
}
|
||||
|
||||
if(!resolutions.empty() && current == resolutions.end()) {
|
||||
std::cerr << "ERROR: No valid resolution found\n";
|
||||
if(current == resolutions.end()) {
|
||||
if(!resolutions.empty())
|
||||
std::cerr << "ERROR: No valid resolution found\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue