summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-01-25 11:08:00 -0500
committerJoel Fischer <joeljfischer@gmail.com>2016-01-25 11:08:00 -0500
commit9d580697f7c541714e19ff8f6d1dd63af00d8eec (patch)
treefcc676cf61354332d7e01db9f67b4fba3825873e
parent1051267d4969b8f136ece2f4d5e523fe91f357aa (diff)
downloadsdl_ios-9d580697f7c541714e19ff8f6d1dd63af00d8eec.tar.gz
Fix SDLRPCStruct could initialize with nil store
* Fixes #76
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m
index c6e516bef..86c352f1d 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m
@@ -12,7 +12,11 @@
- (id)initWithDictionary:(NSMutableDictionary *)dict {
if (self = [super init]) {
- store = dict;
+ if (dict != nil) {
+ store = dict;
+ } else {
+ store = [[NSMutableDictionary alloc] init];
+ }
}
return self;
}