mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Fix crash if content view is removed from window by moving it to another one.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23567 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8bf4c36cc2
commit
9d21170e10
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-09-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSWindowDecorationView.m: ([removeSubview:]) override to
|
||||
check for removal of the window's content view and handle that
|
||||
case so that the window knows the content view has gone.
|
||||
|
||||
2006-09-17 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* Source/NSDocument.m (-initWithContentsOfFile:ofType:): Set the
|
||||
|
|
|
@ -123,6 +123,20 @@ struct NSWindow_struct
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) removeSubview: (NSView*)aView
|
||||
{
|
||||
RETAIN(aView);
|
||||
/*
|
||||
* If the content view is removed, we must let the window know.
|
||||
*/
|
||||
[super removeSubview: aView];
|
||||
if (aView == [_window contentView])
|
||||
{
|
||||
[_window setContentView: nil];
|
||||
}
|
||||
RELEASE(aView);
|
||||
}
|
||||
|
||||
- (void) setBackgroundColor: (NSColor *)color
|
||||
{
|
||||
[self setNeedsDisplayInRect: contentRect];
|
||||
|
|
Loading…
Reference in a new issue