Fixed crash when trying to open non-existent map
This commit is contained in:
@@ -177,8 +177,6 @@ public class JoinDialog extends FloatingDialog{
|
||||
t.add("[lightgray]" + Bundles.format("text.save.map", host.mapname) + " / " + Bundles.format("text.save.wave", host.wave)).left();
|
||||
}).expand().left().bottom().padLeft(12f).padBottom(8);
|
||||
|
||||
//server.content.add(versionString).top().expandY().top().expandX();
|
||||
|
||||
}, e -> {
|
||||
server.content.clear();
|
||||
server.content.add("$text.host.invalid");
|
||||
@@ -323,7 +321,6 @@ public class JoinDialog extends FloatingDialog{
|
||||
public String ip;
|
||||
public int port;
|
||||
|
||||
transient Host host;
|
||||
transient Table content;
|
||||
|
||||
void setIP(String ip){
|
||||
|
||||
@@ -147,9 +147,14 @@ public class MapsDialog extends FloatingDialog{
|
||||
table.row();
|
||||
|
||||
table.addImageTextButton("$text.editor.openin", "icon-load-map", "clear", 16 * 2, () -> {
|
||||
Vars.ui.editor.beginEditMap(map.stream.get());
|
||||
dialog.hide();
|
||||
hide();
|
||||
try{
|
||||
Vars.ui.editor.beginEditMap(map.stream.get());
|
||||
dialog.hide();
|
||||
hide();
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
ui.showError("$text.error.mapnotfound");
|
||||
}
|
||||
}).fillX().height(50f).marginLeft(6);
|
||||
|
||||
table.addImageTextButton("$text.delete", "icon-trash-16", "clear", 16 * 2, () -> {
|
||||
|
||||
Reference in New Issue
Block a user