mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-09 17:19:47 +03:00
minor codestyle fixes, addition of null check (#352)
This commit is contained in:
parent
9c487215d9
commit
ee1d126539
1 changed files with 5 additions and 2 deletions
|
@ -55,12 +55,15 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception {
|
||||||
} else {
|
} else {
|
||||||
pair = client.auth;
|
pair = client.auth;
|
||||||
}
|
}
|
||||||
if(pair == null)
|
if (pair == null) {
|
||||||
{
|
|
||||||
sendError("ProfileByUUIDResponse: AuthProviderPair is null");
|
sendError("ProfileByUUIDResponse: AuthProviderPair is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
username = pair.handler.uuidToUsername(uuid);
|
username = pair.handler.uuidToUsername(uuid);
|
||||||
|
if (username == null) {
|
||||||
|
sendError(String.format("ProfileByUUIDResponse: User with uuid %s not found or AuthProvider#uuidToUsername returned null", uuid));
|
||||||
|
return;
|
||||||
|
}
|
||||||
sendResult(new ProfileByUUIDRequestEvent(getProfile(uuid, username, this.client, client.auth.textureProvider)));
|
sendResult(new ProfileByUUIDRequestEvent(getProfile(uuid, username, this.client, client.auth.textureProvider)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue