diff options
Diffstat (limited to 'SmartDeviceLink/private/SDLVoiceCommandUpdateOperation.m')
-rw-r--r-- | SmartDeviceLink/private/SDLVoiceCommandUpdateOperation.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/SmartDeviceLink/private/SDLVoiceCommandUpdateOperation.m b/SmartDeviceLink/private/SDLVoiceCommandUpdateOperation.m index 548c3fbcb..9d80ea8a3 100644 --- a/SmartDeviceLink/private/SDLVoiceCommandUpdateOperation.m +++ b/SmartDeviceLink/private/SDLVoiceCommandUpdateOperation.m @@ -39,7 +39,10 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager pendingVoiceCommands:(NSArray<SDLVoiceCommand *> *)pendingVoiceCommands oldVoiceCommands:(NSArray<SDLVoiceCommand *> *)oldVoiceCommands updateCompletionHandler:(SDLVoiceCommandUpdateCompletionHandler)completionHandler { self = [self init]; - if (!self) { return nil; } + if (!self) { + completionHandler(@[], [NSError sdl_failedToCreateObjectOfClass:[SDLVoiceCommandUpdateOperation class]]); + return nil; + } _connectionManager = connectionManager; _pendingVoiceCommands = pendingVoiceCommands; |