From 2be7da8ea954a853f99bcc1eb74441313948110d Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 9 Nov 2000 05:03:42 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ Source/NSPort.m | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4352b90ea..d7ac1b22c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-11-09 Richard Frith-Macdonald + + * Source/NSPort.m: ([-setDelegate:]) corrected assertion to allow + delegate to be set to nil. Bug reported by cornils@mail.desy.de + 2000-11-08 Richard Frith-Macdonald * Source/GSString.m: ([GSMutableString substringWithRange:]) fix to diff --git a/Source/NSPort.m b/Source/NSPort.m index 723b51cc0..25cef27a1 100644 --- a/Source/NSPort.m +++ b/Source/NSPort.m @@ -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; }