Fix for setting delegate to nil

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8070 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-11-09 05:03:42 +00:00
parent 50a5077519
commit 2be7da8ea9
2 changed files with 7 additions and 1 deletions

View file

@ -169,7 +169,8 @@ Class NSPort_concrete_class;
- (void) setDelegate: (id) anObject
{
NSAssert([anObject respondsToSelector: @selector(handlePortMessage:)],
NSAssert(anObject == nil
|| [anObject respondsToSelector: @selector(handlePortMessage:)],
NSInvalidArgumentException);
_delegate = anObject;
}