Skip to content

Commit

Permalink
Don't remove observers for key paths we aren't observing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Newdel committed Apr 2, 2010
1 parent 1a6946c commit d29c85f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SUUpdater.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ - (void)registerAsObserver
- (void)unregisterAsObserver
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
if ([host bundle] != [NSBundle mainBundle]) return;
// Removing self as a KVO observer if no observer was registered leads to an NSException. But we don't care.
@try
{
Expand Down

0 comments on commit d29c85f

Please sign in to comment.