From ced2196a57f8e98d8332a8dfbbb3e8685bf6521c Mon Sep 17 00:00:00 2001 From: wim Date: Tue, 30 Mar 2004 14:09:03 +0000 Subject: [PATCH] ([-removeObserver:]): Do not raise an exception when removing nil observer, jusr return. This is WO4.5 and MacOSX behaviour. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18971 72102866-910b-0410-8b05-ffd578937521 --- Source/NSNotificationCenter.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/NSNotificationCenter.m b/Source/NSNotificationCenter.m index 6eaff4777..931e6f7a0 100644 --- a/Source/NSNotificationCenter.m +++ b/Source/NSNotificationCenter.m @@ -899,9 +899,8 @@ static NSNotificationCenter *default_center = nil; - (void) removeObserver: (id)observer { if (observer == nil) - [NSException raise: NSInvalidArgumentException - format: @"Nil observer passed to removeObserver:"]; - + return; + [self removeObserver: observer name: nil object: nil]; }