Fix null pointer issue with async skull converting

This commit is contained in:
Thinkofdeath 2015-03-07 15:48:05 +00:00
parent a93c6f2875
commit fc2a701b92

View file

@ -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() {