diff options
author | Joey Grover <joeygrover@gmail.com> | 2019-04-03 16:57:27 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2019-04-03 16:57:27 -0400 |
commit | c160d190b979bfece4504ae111ba96bf68a3e490 (patch) | |
tree | d0c67fcafc459d5777c6b358fe32ae29d5e1da70 | |
parent | fceb6446cc200f980080b5dafa6889de1092c3a8 (diff) | |
download | sdl_android-c160d190b979bfece4504ae111ba96bf68a3e490.tar.gz |
Add another null check to SystemCapability
-rw-r--r-- | base/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java index 38e731e9b..82cb366d7 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java @@ -99,7 +99,9 @@ public class SystemCapability extends RPCStruct { } public void setCapabilityForType(SystemCapabilityType type, RPCStruct capability){ - if(type.equals(SystemCapabilityType.NAVIGATION)){ + if(type == null) { + return; + }else if(type.equals(SystemCapabilityType.NAVIGATION)){ setValue(KEY_NAVIGATION_CAPABILITY, capability); }else if(type.equals(SystemCapabilityType.PHONE_CALL)){ setValue(KEY_PHONE_CAPABILITY, capability); |