summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-12 17:44:04 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-12 17:44:04 +0000
commit92337c525e17a76dc896a11c4ddd0f7595bd7bd0 (patch)
tree7e5cbd0f58e5552da6aba6173353ab458087ca49
parentfed503f01540f43db73445247e9bc332333b1da6 (diff)
downloadpcsxr-92337c525e17a76dc896a11c4ddd0f7595bd7bd0.tar.gz
Fix a memory leak in non-ARC code.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82826 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rwxr-xr-xmacosx/HotkeyController.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/macosx/HotkeyController.m b/macosx/HotkeyController.m
index 716c5d84..9b9a6de9 100755
--- a/macosx/HotkeyController.m
+++ b/macosx/HotkeyController.m
@@ -131,14 +131,15 @@
- (void)saveHotkey:(NSString*)keyIdent device:(NSString*)device deviceLabel:(NSString*)deviceLabel code:(NSString*)keyCode label:(NSString*)keyLabel
{
- NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"HotkeyBindings"]];
- [tempUserMappings setValue:[[NSDictionary alloc] initWithObjectsAndKeys:
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults] ;
+ NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:@"HotkeyBindings"]];
+ [tempUserMappings setValue:[NSDictionary dictionaryWithObjectsAndKeys:
device, @"device",
deviceLabel, @"deviceName",
keyCode, @"keyCode",
keyLabel, @"keyLabel",
nil] forKey:keyIdent];
- [[NSUserDefaults standardUserDefaults] setValue:tempUserMappings forKey:@"HotkeyBindings"];
+ [defaults setValue:tempUserMappings forKey:@"HotkeyBindings"];
}
- (NSString *) parseMappingDisplayString:(NSString *)keyString