mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix panic if default server index is out of bounds
This commit is contained in:
parent
198b8a4994
commit
027d0f11da
@ -205,7 +205,10 @@ impl MainMenuUi {
|
||||
rot_imgs,
|
||||
username: networking.username.clone(),
|
||||
password: "".to_owned(),
|
||||
server_address: networking.servers[networking.default_server].clone(),
|
||||
server_address: networking
|
||||
.servers
|
||||
.get(networking.default_server)
|
||||
.map_or_else(|| String::new(), |address| address.clone()),
|
||||
popup: None,
|
||||
connecting: None,
|
||||
show_servers: false,
|
||||
|
Loading…
Reference in New Issue
Block a user