mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 07:10:37 +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
|
@ -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…
Add table
Add a link
Reference in a new issue