Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

Commit

Permalink
Over unobserving is ok!
Browse files Browse the repository at this point in the history
  • Loading branch information
schwa committed Jan 26, 2012
1 parent 4bd02c0 commit 135bb98
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions NSObject_KVOBlock.m
Expand Up @@ -114,12 +114,9 @@ - (void)removeKVOBlockForToken:(id)inToken


if (theHelper == NULL) if (theHelper == NULL)
{ {
NSLog(@"KVOBlock never registered?");
return; return;
} }


NSAssert(theHelper != NULL, @"KVOBlock never registered");

void *theContext = (__bridge void *)[theHelper canonicalKeyForKey:inToken]; void *theContext = (__bridge void *)[theHelper canonicalKeyForKey:inToken];
NSString *theKeyPath = [theHelper keypathForKey:inToken]; NSString *theKeyPath = [theHelper keypathForKey:inToken];
[self removeObserver:theHelper forKeyPath:theKeyPath context:theContext]; [self removeObserver:theHelper forKeyPath:theKeyPath context:theContext];
Expand Down

0 comments on commit 135bb98

Please sign in to comment.