fix potential npe selecting server in alias dialog

This commit is contained in:
Craig Raw 2022-10-28 09:41:31 +02:00
parent e7f6f7f3db
commit e2795c7ef3

View file

@ -158,7 +158,7 @@ public class ServerAliasDialog extends Dialog<Server> {
} }
public Server getServer() { public Server getServer() {
return new Server(server.getUrl(), labelProperty.get().isEmpty() ? null : labelProperty.get()); return new Server(server.getUrl(), labelProperty.get() == null || labelProperty.get().isEmpty() ? null : labelProperty.get());
} }
} }