浏览代码

Added missing null check

t00thpick1 13 年之前
父节点
当前提交
c084ccde40
共有 1 个文件被更改,包括 3 次插入0 次删除
  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)) {