Sfoglia il codice sorgente

Added missing null check

t00thpick1 13 anni fa
parent
commit
c084ccde40
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/main/java/com/gmail/nossr50/util/Skills.java

+ 3 - 0
src/main/java/com/gmail/nossr50/util/Skills.java

@@ -396,6 +396,9 @@ public class Skills {
      */
     public static void abilityCheck(Player player, SkillType type) {
         PlayerProfile profile = Users.getProfile(player);
+        if (profile == null) {
+            return;
+        }
         ToolType tool = type.getTool();
 
         if (!profile.getToolPreparationMode(tool)) {