mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 20:49:13 +00:00
Dont crash app if a menu item does not have an action
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5440 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
28fbc965b0
commit
982f1fda3c
1 changed files with 6 additions and 3 deletions
|
@ -689,9 +689,12 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
|
|||
[nc postNotificationName: NSMenuWillSendActionNotification
|
||||
object: self
|
||||
userInfo: d];
|
||||
[[NSApplication sharedApplication] sendAction: [item action]
|
||||
to: [item target]
|
||||
from: item];
|
||||
if ([item action])
|
||||
{
|
||||
[[NSApplication sharedApplication] sendAction: [item action]
|
||||
to: [item target]
|
||||
from: item];
|
||||
}
|
||||
[nc postNotificationName: NSMenuDidSendActionNotification
|
||||
object: self
|
||||
userInfo: d];
|
||||
|
|
Loading…
Reference in a new issue