diff --git a/ChangeLog b/ChangeLog index 5177d42e5..70407f510 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-27 Wolfgang Lux + + * Source/NSWindowController.m (-_windowWillClose:): Extend + lifetime of the window controller to the end of the current event + cycle to prevent crashes due to a premature release after the + latest nib loading changes. + 2010-03-27 David Chisnall * Source/NSWindow.m diff --git a/Source/NSWindowController.m b/Source/NSWindowController.m index 4f95514ce..1497431a0 100644 --- a/Source/NSWindowController.m +++ b/Source/NSWindowController.m @@ -261,6 +261,7 @@ nothing to do here. */ if ([_window isReleasedWhenClosed]) { + RETAIN(self); if ([_window delegate] == self) { [_window setDelegate: nil]; @@ -281,6 +282,7 @@ [self setWindow: nil]; [_document _removeWindowController: self]; + AUTORELEASE(self); } } }