Skip to content

Commit

Permalink
Static analysis fix: leaking Objective-C object.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 20, 2014
1 parent 84b919a commit a25bd63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/video/cocoa/SDL_cocoaevents.m
Expand Up @@ -159,13 +159,19 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filenam
NSMenu *windowMenu;
NSMenu *viewMenu;
NSMenuItem *menuItem;
NSMenu *mainMenu;

if (NSApp == nil) {
return;
}


mainMenu = [[NSMenu alloc] init];

/* Create the main menu bar */
[NSApp setMainMenu:[[NSMenu alloc] init]];
[NSApp setMainMenu:mainMenu];

[mainMenu release]; /* we're done with it, let NSApp own it. */
mainMenu = nil;

/* Create the application menu */
appName = GetApplicationName();
Expand Down

0 comments on commit a25bd63

Please sign in to comment.