summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-07-02 10:57:46 -0400
committerJoel Fischer <joeljfischer@gmail.com>2018-07-02 10:57:46 -0400
commit3706e169b8d3c648a74681c26c94a656a78035c3 (patch)
treed341ecd55077fe52b0925cbbe46b6d584fda1f99
parent51d3908b239ddf17379781b64da79f7c9a909b49 (diff)
downloadsdl_ios-bugfix/issue_998_invalid_enum.tar.gz
Check class type to account for the reason enum being “-1”bugfix/issue_998_invalid_enum
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index c786007eb..1b37387e3 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -679,7 +679,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
[self.lifecycleStateMachine transitionToState:SDLLifecycleStateStopped];
} else if ([self.lifecycleStateMachine isCurrentState:SDLLifecycleStateStopped]) {
return;
- } else if ([appUnregisteredNotification.reason isEqualToEnum:SDLAppInterfaceUnregisteredReasonAppUnauthorized]) {
+ } else if ([appUnregisteredNotification.reason isKindOfClass:[NSString class]] && [appUnregisteredNotification.reason isEqualToEnum:SDLAppInterfaceUnregisteredReasonAppUnauthorized]) {
[self.lifecycleStateMachine transitionToState:SDLLifecycleStateStopped];
} else {
[self.lifecycleStateMachine transitionToState:SDLLifecycleStateReconnecting];