Cocoa Port:
- Fix bug where where nil profile names were unhandled. - Prevent the user from continuing if a blank profile name is entered.
This commit is contained in:
parent
41a4ee009f
commit
cc767726aa
File diff suppressed because it is too large
Load Diff
|
@ -138,6 +138,11 @@
|
|||
{
|
||||
NSDictionary *profileDict = [defaultProfileList objectAtIndex:i];
|
||||
NSString *profileName = (NSString *)[profileDict valueForKey:@"Name"];
|
||||
if (profileName == nil)
|
||||
{
|
||||
profileName = @"";
|
||||
}
|
||||
|
||||
NSMenuItem *newProfileMenuItem = [[[NSMenuItem alloc] initWithTitle:profileName
|
||||
action:@selector(profileSelect:)
|
||||
keyEquivalent:@""] autorelease];
|
||||
|
@ -164,6 +169,11 @@
|
|||
{
|
||||
NSDictionary *profileDict = [savedProfilesList objectAtIndex:i];
|
||||
NSString *profileName = (NSString *)[profileDict valueForKey:@"Name"];
|
||||
if (profileName == nil)
|
||||
{
|
||||
profileName = @"";
|
||||
}
|
||||
|
||||
NSMenuItem *newProfileMenuItem = [[[NSMenuItem alloc] initWithTitle:profileName
|
||||
action:@selector(profileSelect:)
|
||||
keyEquivalent:@""] autorelease];
|
||||
|
@ -281,7 +291,13 @@
|
|||
return;
|
||||
}
|
||||
|
||||
[[inputProfileMenu selectedItem] setTitle:(NSString *)[selectedProfile valueForKey:@"Name"]];
|
||||
NSString *profileName = (NSString *)[selectedProfile valueForKey:@"Name"];
|
||||
if (profileName == nil)
|
||||
{
|
||||
profileName = @"";
|
||||
}
|
||||
|
||||
[[inputProfileMenu selectedItem] setTitle:profileName];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:savedProfilesList forKey:@"Input_SavedProfiles"];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue