Browse files

Mac GUI: be sure value is not nil before adding to the KV store.

  • Loading branch information...
1 parent 8d6a3be commit bd25ab359ded538d31193d9d3dc4b1c808643a67 @bradallred bradallred committed Apr 30, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 apple/CocoaWrapper/mac/CocoaWrapper.mm
View
4 apple/CocoaWrapper/mac/CocoaWrapper.mm
@@ -137,8 +137,10 @@ - (IBAction)launchGame:(id) __unused sender
} else if ([obj isKindOfClass:[NSString class]]) {
value = (NSString*)obj;
}
- config->SetKeyValuePair([key cStringUsingEncoding:NSASCIIStringEncoding],
+ if (value) {
+ config->SetKeyValuePair([key cStringUsingEncoding:NSASCIIStringEncoding],
[value cStringUsingEncoding:NSASCIIStringEncoding]);
+ }
}
int status;

0 comments on commit bd25ab3

Please sign in to comment.