Fixed crash when skull texture not found

Added switch for cache
This commit is contained in:
Alexander Xia committed 2016-04-03 16:29:00 +08:00
1 parent 8fa3a567ac
commit 4ebce88594
4 files changed
+12 -15

No files matched your search

@@ -35,6 +35,8 @@ public class ModelManager0 {
*/
public static UserProfile toUserProfile(Map profile){
UserProfile userProfile=new UserProfile();
if(profile==null)
return userProfile;
MinecraftProfileTexture skin=(MinecraftProfileTexture)profile.get(Type.SKIN);
userProfile.skinUrl= skin==null?null:skin.getUrl();//Avoid NullPointerException
userProfile.model= skin==null?null:skin.getMetadata("model");