Fix bug where NSView's -dealloc could break the key view chain.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29081 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-11-29 14:25:54 +00:00
parent c9ae01cb7a
commit 2ebe9f4335
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2009-11-29 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSView.m (-dealloc): Fix bug where -dealloc could break
the key view chain.
* Source/NSSavePanel.m (-ok:): Present a warning when the user has
entered a filename with a wrong extension.

View file

@ -583,7 +583,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
* First we do the obvious stuff using the standard methods.
*/
[self setNextKeyView: nil];
[[self previousKeyView] setNextKeyView: nil];
tmp = [self previousKeyView];
if ([tmp nextKeyView] == self)
[tmp setNextKeyView: nil];
/*
* Now, we locate any remaining cases where a view has us as its next