From 9d9b1348597b6551832b18b55cac425fd493e1bf Mon Sep 17 00:00:00 2001 From: AlexIIL Date: Sat, 19 Apr 2014 16:07:57 +0100 Subject: [PATCH] Update ReflectMjAPI.java Removed a potential NPE (this can occur when a class contains a null mjBattery object) --- common/buildcraft/core/ReflectMjAPI.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/buildcraft/core/ReflectMjAPI.java b/common/buildcraft/core/ReflectMjAPI.java index 408059a4..db9be768 100755 --- a/common/buildcraft/core/ReflectMjAPI.java +++ b/common/buildcraft/core/ReflectMjAPI.java @@ -84,6 +84,8 @@ public class ReflectMjAPI { } public static BatteryObject getMjBattery (Object o) { + if (o == null) + return null; BatteryField f = getMjBattery (o.getClass()); if (f == null) {