mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 01:50:48 +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
43f595f7f0
commit
6fe88f9e37
2 changed files with 9 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue