summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Beharry <justin.beharry@livio.io>2022-09-15 16:42:00 -0400
committerJustin Beharry <justin.beharry@livio.io>2022-09-15 16:42:00 -0400
commit8180e65affca9258425cef1f016b36768c18c288 (patch)
treebab08c05a12a0187243070f983d59f1b33285358
parentb5465e668952f8a5f665a167326e3cef28346f68 (diff)
downloadsdl_ios-8180e65affca9258425cef1f016b36768c18c288.tar.gz
Add check to make sure error state key exists
-rw-r--r--SmartDeviceLink/private/SDLTextAndGraphicManager.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/SmartDeviceLink/private/SDLTextAndGraphicManager.m b/SmartDeviceLink/private/SDLTextAndGraphicManager.m
index f62487338..2945411a6 100644
--- a/SmartDeviceLink/private/SDLTextAndGraphicManager.m
+++ b/SmartDeviceLink/private/SDLTextAndGraphicManager.m
@@ -178,7 +178,10 @@ NS_ASSUME_NONNULL_BEGIN
} else if (error != nil) {
// Invalidate data that's different from our current screen data if a Show or SetDisplayLayout fails. This will prevent subsequent `Show`s from failing if the request failed due to the developer setting invalid data or subsequent `SetDisplayLayout`s from failing if the template is not supported on the module.
[strongSelf sdl_resetFieldsToCurrentScreenData];
- [strongSelf sdl_updatePendingOperationsWithFailedScreenState:error.userInfo[SDLTextAndGraphicFailedScreenStateErrorKey]];
+ SDLTextAndGraphicState *errorState = [error.userInfo objectForKey:SDLTextAndGraphicFailedScreenStateErrorKey];
+ if (errorState) {
+ [strongSelf sdl_updatePendingOperationsWithFailedScreenState:errorState];
+ }
}
} updateCompletionHandler:handler];