mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 22:07:59 +01:00
Fix freeze when skull texture payload has no id.
This commit is contained in:
parent
ca9743e377
commit
b0e30dbcdc
1 changed files with 7 additions and 0 deletions
|
@ -83,10 +83,17 @@ public final class HDSkinManager implements IResourceManagerReloadListener {
|
||||||
// uuid is required
|
// uuid is required
|
||||||
if (uuid != null)
|
if (uuid != null)
|
||||||
profile1 = new GameProfile(uuid, name);
|
profile1 = new GameProfile(uuid, name);
|
||||||
|
|
||||||
|
// probably uses this texture for a reason. Don't mess with it.
|
||||||
|
if (!texturePayload.getTextures().isEmpty() && texturePayload.getProfileId() == null)
|
||||||
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final GameProfile profile = profile1;
|
final GameProfile profile = profile1;
|
||||||
|
|
||||||
|
// cannot get texture without id!
|
||||||
|
if (profile.getId() == null) return Optional.empty();
|
||||||
|
|
||||||
if (!this.skinCache.containsKey(profile.getId())) {
|
if (!this.skinCache.containsKey(profile.getId())) {
|
||||||
this.skinCache.put(profile.getId(), Maps.newHashMap());
|
this.skinCache.put(profile.getId(), Maps.newHashMap());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue