summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SmartDeviceLink/SDLSoftButtonObject.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLSoftButtonObject.m b/SmartDeviceLink/SDLSoftButtonObject.m
index 3d74c168a..adb153e1a 100644
--- a/SmartDeviceLink/SDLSoftButtonObject.m
+++ b/SmartDeviceLink/SDLSoftButtonObject.m
@@ -64,6 +64,11 @@ NS_ASSUME_NONNULL_BEGIN
return NO;
}
+ if (self.states.count == 1) {
+ SDLLogW(@"There's only one state, so no transitioning is possible!");
+ return NO;
+ }
+
SDLLogD(@"Transitioning button %@ to state %@", self.name, stateName);
self.currentStateName = stateName;
[self.manager sdl_transitionSoftButton:self];