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,
|
rot_imgs,
|
||||||
username: networking.username.clone(),
|
username: networking.username.clone(),
|
||||||
password: "".to_owned(),
|
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,
|
popup: None,
|
||||||
connecting: None,
|
connecting: None,
|
||||||
show_servers: false,
|
show_servers: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user