Skip to content

Commit

Permalink
Null check signature
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Aug 24, 2016
1 parent 95261e4 commit 2dab3d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Expand Up @@ -1512,7 +1512,6 @@ public void skin(final CommandContext args, final CommandSender sender, final NP
}
Messaging.sendTr(sender, Messages.SKIN_SET, npc.getName(), skinName);
if (npc.isSpawned()) {

SkinnableEntity skinnable = npc.getEntity() instanceof SkinnableEntity ? (SkinnableEntity) npc.getEntity()
: null;
if (skinnable != null) {
Expand Down
2 changes: 1 addition & 1 deletion main/src/main/java/net/citizensnpcs/npc/skin/Skin.java
Expand Up @@ -327,7 +327,7 @@ private static void setNPCTexture(SkinnableEntity entity, Property skinProperty)
// packet errors that disconnect the client.
Property current = Iterables.getFirst(profile.getProperties().get("textures"), null);
if (current != null && current.getValue().equals(skinProperty.getValue())
&& current.getSignature().equals(skinProperty.getSignature())) {
&& (current.getSignature() != null && current.getSignature().equals(skinProperty.getSignature()))) {
return;
}

Expand Down

0 comments on commit 2dab3d3

Please sign in to comment.