Fix crash on receiving an AppleEvent

This commit is contained in:
2014-04-15 02:40:26 -04:00
parent fd0595eb09
commit e73d14e0ee

View File

@@ -31,7 +31,7 @@ typedef NSAppleEventDescriptor AEDescr;
@end
void set_up_apple_events() {
AppleEventHandler* aeHandler = [[[AppleEventHandler alloc] init] autorelease];
AppleEventHandler* aeHandler = [[AppleEventHandler alloc] init];
NSAppleEventManager* AEmgr = [NSAppleEventManager sharedAppleEventManager];
[AEmgr setEventHandler: aeHandler andSelector: @selector(handleOpenApp:withReply:)
forEventClass: kCoreEventClass andEventID: kAEOpenApplication];