From c0684632328c08a74e0c5c15be217b2ffe3d678f Mon Sep 17 00:00:00 2001 From: Sobki Date: Thu, 26 Jan 2017 11:10:31 +1000 Subject: [PATCH] Added null checks to hasPassive(...) (#709) --- .../projectkorra/ability/util/PassiveManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/projectkorra/projectkorra/ability/util/PassiveManager.java b/src/com/projectkorra/projectkorra/ability/util/PassiveManager.java index 9d07f3e6..ca6399a5 100644 --- a/src/com/projectkorra/projectkorra/ability/util/PassiveManager.java +++ b/src/com/projectkorra/projectkorra/ability/util/PassiveManager.java @@ -67,6 +67,11 @@ public class PassiveManager { } public static boolean hasPassive(Player player, CoreAbility passive) { + if (player == null) { + return false; + } else if (passive == null) { + return false; + } BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player); Element element = passive.getElement(); if (passive.getElement() instanceof SubElement) {