hedgewars/SDLMain.m
changeset 4360 6cdb427ef82c
parent 3697 d5b30d6373fc
--- a/hedgewars/SDLMain.m	Sat Nov 27 23:29:07 2010 +0100
+++ b/hedgewars/SDLMain.m	Sun Nov 28 01:58:43 2010 +0100
@@ -216,9 +216,11 @@
 #endif /* SDL_USE_CPS */
 
     /* Set up the menubar */
-    [NSApp setMainMenu:[[NSMenu alloc] init]];
+    NSMenu *menu = [[NSMenu alloc] init];
+    [NSApp setMainMenu:menu];
     setApplicationMenu();
     setupWindowMenu();
+    [menu release];
 
     /* Create SDLMain and make it the app delegate */
     sdlMain = [[SDLMain alloc] init];