mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
Extend lifetime of a window controller to the end of the current event
cycle when its window is closed to prevent crashes due to a premature release after the latest nib loading changes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30051 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
080e8d5097
commit
4dd7da00e0
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-03-27 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* 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 <theraven@gna.org>
|
||||
|
||||
* Source/NSWindow.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue