diff options
author | Justin Beharry <justin.beharry@livio.io> | 2022-09-15 16:42:00 -0400 |
---|---|---|
committer | Justin Beharry <justin.beharry@livio.io> | 2022-09-15 16:42:00 -0400 |
commit | 8180e65affca9258425cef1f016b36768c18c288 (patch) | |
tree | bab08c05a12a0187243070f983d59f1b33285358 | |
parent | b5465e668952f8a5f665a167326e3cef28346f68 (diff) | |
download | sdl_ios-8180e65affca9258425cef1f016b36768c18c288.tar.gz |
Add check to make sure error state key exists
-rw-r--r-- | SmartDeviceLink/private/SDLTextAndGraphicManager.m | 5 |
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]; |