Fix null pointer issue with async skull converting
This commit is contained in:
@@ -157,18 +157,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- if (gameprofile1 == null) {
|
||||
- return gameprofile;
|
||||
+ GameProfile profile = skinCache.getIfPresent(gameprofile.getName());
|
||||
+ if (profile != null) {
|
||||
+ if (profile != null && Iterables.getFirst(profile.getProperties().get("textures"), (Object) null) != null) {
|
||||
+ callback.apply(profile);
|
||||
} else {
|
||||
- Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null);
|
||||
+ Property property = (Property) Iterables.getFirst(profile.getProperties().get("textures"), (Object) null);
|
||||
|
||||
-
|
||||
- if (property == null) {
|
||||
- gameprofile1 = MinecraftServer.getServer().aC().fillProfileProperties(gameprofile1, true);
|
||||
+ if (property != null) {
|
||||
+ callback.apply(profile);
|
||||
+ return;
|
||||
}
|
||||
- }
|
||||
-
|
||||
- return gameprofile1;
|
||||
+ executor.execute(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user