Update ReflectMjAPI.java
Removed a potential NPE (this can occur when a class contains a null mjBattery object)
This commit is contained in:
parent
b30995aea0
commit
9d9b134859
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue