MP lobby: don't attempt to restore player list scroll position too early
Fixes error messages in the log when joining the lobby.
This commit is contained in:
parent
c8c3625e3a
commit
91e60267ba
1 changed files with 4 additions and 1 deletions
|
@ -690,7 +690,10 @@ void mp_lobby::update_playerlist()
|
|||
player_list_.other_rooms.update_player_count_label();
|
||||
player_list_.other_games.update_player_count_label();
|
||||
|
||||
player_list_.tree->set_vertical_scrollbar_item_position(scrollbar_position);
|
||||
// Don't attempt to restore the scroll position if the window hasn't been laid out yet
|
||||
if(player_list_.tree->get_origin() != point{-1, -1}) {
|
||||
player_list_.tree->set_vertical_scrollbar_item_position(scrollbar_position);
|
||||
}
|
||||
|
||||
player_list_dirty_ = false;
|
||||
last_lobby_update_ = SDL_GetTicks();
|
||||
|
|
Loading…
Add table
Reference in a new issue