From 229d1e18d44666929dc126b6cd80398143b80f9a Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Wed, 19 Nov 2003 05:59:55 +0000 Subject: [PATCH] Fixing segfault. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18094 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 ++++++- GormDocument.m | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 426aca2d..2306bba5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-19 01:00 Gregory John Casamento + + * GormDocument.m: Removed AUTORELEASE from creation of placeholders + for both the image and the sound. This was causing a segfault. + 2003-11-15 16:53 Gregory John Casamento * GormViewWithContectViewEditor.m: Added methods @@ -34,7 +39,7 @@ * GormBoxEditor.m: Removed commented out code. * GormControlEditor.m: same * GormCustomView.m: same - * GormFintViewController.m: same + * GormFontViewController.m: same * GormGenericEditor.m: same * GormImageEditor.m: same * GormSoundEditor.m: same diff --git a/GormDocument.m b/GormDocument.m index 3e58d02a..6dbf884c 100644 --- a/GormDocument.m +++ b/GormDocument.m @@ -301,14 +301,14 @@ static NSImage *classesImage = nil; - (GormSound *)_createSoundPlaceHolder: (NSString *)path { NSString *name = [[path lastPathComponent] stringByDeletingPathExtension]; - return AUTORELEASE([[GormSound alloc] initWithName: name path: path]); + return [[GormSound alloc] initWithName: name path: path]; } // image support - (GormImage *)_createImagePlaceHolder: (NSString *)path { NSString *name = [[path lastPathComponent] stringByDeletingPathExtension]; - return TEST_AUTORELEASE([[GormImage alloc] initWithName: name path: path]); + return [[GormImage alloc] initWithName: name path: path]; } - (void) beginArchiving @@ -2003,8 +2003,6 @@ static NSImage *classesImage = nil; */ ASSIGN(documentPath, aFile); [window setTitleWithRepresentedFilename: documentPath]; - [nc postNotificationName: IBDidOpenDocumentNotification - object: self]; /* * read in all of the sounds in the .gorm wrapper and @@ -2069,6 +2067,10 @@ static NSImage *classesImage = nil; } } + // this is the last thing we should do... + [nc postNotificationName: IBDidOpenDocumentNotification + object: self]; + return self; }