summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2022-01-12 15:40:21 -0500
committerJoel Fischer <joeljfischer@gmail.com>2022-01-12 15:40:21 -0500
commitbd8041dacc0983fef3946c2bed169b55a62669b1 (patch)
treec67ec71c5e5720d239184def7c12be6c9b73f997
parentd1f951651a339e0c9e00a5c1f2c7a4bf4299d27e (diff)
downloadsdl_ios-bugfix/issue-2067-softbuttonobject-invalid-config.tar.gz
-rw-r--r--SmartDeviceLink/public/SDLSoftButtonState.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/SmartDeviceLink/public/SDLSoftButtonState.m b/SmartDeviceLink/public/SDLSoftButtonState.m
index 63b30c69c..fdbbad09d 100644
--- a/SmartDeviceLink/public/SDLSoftButtonState.m
+++ b/SmartDeviceLink/public/SDLSoftButtonState.m
@@ -47,7 +47,10 @@ NS_ASSUME_NONNULL_BEGIN
if (!self) { return nil; }
NSParameterAssert((text != nil) || (artwork != nil));
- if ((text == nil) && (artwork == nil)) { return nil; }
+ if ((text == nil) && (artwork == nil)) {
+ SDLLogE(@"Error creating soft button state: the state requires either text or an image, or both. StateName: %@", stateName);
+ return nil;
+ }
_name = stateName;
_text = text;