From cf33ac8c4bcec080fc6ee6127e52db133ec9c04f Mon Sep 17 00:00:00 2001 From: FredKiefer Date: Sun, 23 Dec 2001 13:30:35 +0000 Subject: [PATCH] [initialize] retain the gui bundle and added an auto release pool as this might be called without one installed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11888 72102866-910b-0410-8b05-ffd578937521 --- Source/NSApplication.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 0da8b08c0..62b003cd0 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -440,6 +440,7 @@ static NSCell* tileCell = nil; { if (self == [NSApplication class]) { + CREATE_AUTORELEASE_POOL(pool); /* * Dummy functions to fool linker into linking files that contain * only catagories - static libraries seem to have problems here. @@ -453,13 +454,15 @@ static NSCell* tileCell = nil; /* Create the gui bundle we use to localize messages. */ guiBundle = [NSBundle bundleForLibrary: @"gnustep-gui"]; - + RETAIN(guiBundle); + /* Save the base library exception handler */ defaultUncaughtExceptionHandler = NSGetUncaughtExceptionHandler (); /* Cache the NSAutoreleasePool class */ arpClass = [NSAutoreleasePool class]; nc = [NSNotificationCenter defaultCenter]; + RELEASE(pool); } }