Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Static analysis fix: Fixed leaking Objective-C object.
- Loading branch information
Showing
with
3 additions
and
1 deletion.
-
+3
−1
src/video/cocoa/SDL_cocoaevents.m
|
@@ -25,6 +25,7 @@ |
|
|
|
|
|
#include "SDL_cocoavideo.h" |
|
|
#include "../../events/SDL_events_c.h" |
|
|
#include "SDL_assert.h" |
|
|
|
|
|
#if !defined(UsrActivity) && defined(__LP64__) && !defined(__POWER__) |
|
|
/* |
|
@@ -266,6 +267,7 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filenam |
|
|
pool = [[NSAutoreleasePool alloc] init]; |
|
|
if (NSApp == nil) { |
|
|
[SDLApplication sharedApplication]; |
|
|
SDL_assert(NSApp != nil); |
|
|
|
|
|
if ([NSApp mainMenu] == nil) { |
|
|
CreateApplicationMenus(); |
|
@@ -276,7 +278,7 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filenam |
|
|
[NSNumber numberWithBool:NO], @"ApplePressAndHoldEnabled", |
|
|
nil]; |
|
|
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; |
|
|
|
|
|
[appDefaults release]; |
|
|
} |
|
|
if (NSApp && !appDelegate) { |
|
|
appDelegate = [[SDLAppDelegate alloc] init]; |
|
|