From 54b77fd2cc26dd08f861156caddbf591d93e7f2b Mon Sep 17 00:00:00 2001 From: Joel Fischer Date: Fri, 28 Jul 2017 14:50:51 -0400 Subject: [PATCH] Fix a bug where the SDLRPCResponseDispatcher could crash when being cleared --- SmartDeviceLink/SDLResponseDispatcher.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SmartDeviceLink/SDLResponseDispatcher.m b/SmartDeviceLink/SDLResponseDispatcher.m index b9fcf4095..b5bd9f915 100644 --- a/SmartDeviceLink/SDLResponseDispatcher.m +++ b/SmartDeviceLink/SDLResponseDispatcher.m @@ -109,7 +109,7 @@ - (void)storeRequest:(SDLRPCRequest *)request handler:(nullable SDLResponseHandl - (void)clear { // When we get disconnected we have to delete all existing responseHandlers as they are not valid anymore - for (SDLRPCCorrelationId *correlationID in self.rpcResponseHandlerMap) { + for (SDLRPCCorrelationId *correlationID in self.rpcResponseHandlerMap.dictionaryRepresentation) { SDLResponseHandler responseHandler = self.rpcResponseHandlerMap[correlationID]; responseHandler(self.rpcRequestDictionary[correlationID], nil, [NSError sdl_lifecycle_notConnectedError]); }