mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
Fixed bug which was crashing the popup button
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6172 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
01de4c815e
commit
5255f9f2ac
1 changed files with 8 additions and 1 deletions
|
@ -415,7 +415,14 @@ static NSString *NSMenuLocationsKey = @"NSMenuLocations";
|
|||
*/
|
||||
- (int) indexOfItem: (id <NSMenuItem>)anObject
|
||||
{
|
||||
return [menu_items indexOfObjectIdenticalTo: anObject];
|
||||
int index;
|
||||
|
||||
index = [menu_items indexOfObjectIdenticalTo: anObject];
|
||||
|
||||
if (index == NSNotFound)
|
||||
return -1;
|
||||
else
|
||||
return index;
|
||||
}
|
||||
|
||||
- (int) indexOfItemWithTitle: (NSString*)aTitle
|
||||
|
|
Loading…
Reference in a new issue