diff options
author | rowanbeentje <rowan@beent.je> | 2013-05-21 22:53:10 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-05-21 22:53:10 +0000 |
commit | 2737ac00c38513d976fda08104a5014221b0c99c (patch) | |
tree | 38829f7d5d9982b9648259cae0a269ef1640dd18 /Source/SPChooseMenuItemDialog.m | |
parent | 9432986de1d25527b133715ab12a8dffc2c5f6b6 (diff) | |
download | sequelpro-2737ac00c38513d976fda08104a5014221b0c99c.tar.gz sequelpro-2737ac00c38513d976fda08104a5014221b0c99c.tar.bz2 sequelpro-2737ac00c38513d976fda08104a5014221b0c99c.zip |
- Fix all the Xcode 4.6.2 build warnings, and tweak warning settings to enable some more
Diffstat (limited to 'Source/SPChooseMenuItemDialog.m')
-rw-r--r-- | Source/SPChooseMenuItemDialog.m | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/SPChooseMenuItemDialog.m b/Source/SPChooseMenuItemDialog.m index 4bfdcbcb..770c1891 100644 --- a/Source/SPChooseMenuItemDialog.m +++ b/Source/SPChooseMenuItemDialog.m @@ -106,7 +106,7 @@ for (id item in theList) { - NSMenuItem *aMenuItem; + NSMenuItem *aMenuItem = nil; if ([item isKindOfClass:[NSString class]]) { aMenuItem = [[NSMenuItem alloc] initWithTitle:item action:@selector(menuItemHandler:) keyEquivalent:@""]; @@ -124,10 +124,12 @@ [aMenuItem setToolTip:[item objectForKey:@"tooltip"]]; } } - - [aMenuItem setTag:cnt++]; - [theMenu addItem:aMenuItem]; - [aMenuItem release]; + + if (aMenuItem) { + [aMenuItem setTag:cnt++]; + [theMenu addItem:aMenuItem]; + [aMenuItem release]; + } } [dialog setContextMenu:theMenu]; |