Skip to content

Commit

Permalink
#139 Fix exception on removing key value observer
Browse files Browse the repository at this point in the history
  • Loading branch information
1and2papa committed Sep 25, 2015
1 parent 25d8630 commit 7a21a18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CTAssetsPickerController/CTAssetScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ - (void)removePlayerLoadedTimeRangesObserver
[self.player removeObserver:self forKeyPath:@"currentItem.loadedTimeRanges"];
}
@catch (NSException *exception) {
// do noting
// do nothing
}
}

Expand All @@ -570,7 +570,7 @@ - (void)removePlayerRateObserver
[self.player removeObserver:self forKeyPath:@"rate"];
}
@catch (NSException *exception) {
// do noting
// do nothing
}
}

Expand Down
7 changes: 6 additions & 1 deletion CTAssetsPickerController/CTAssetsPickerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,12 @@ - (void)addKeyValueObserver

- (void)removeKeyValueObserver
{
[self removeObserver:self forKeyPath:@"selectedAssets"];
@try {
[self removeObserver:self forKeyPath:@"selectedAssets"];
}
@catch (NSException *exception) {
// do nothing
}
}


Expand Down

0 comments on commit 7a21a18

Please sign in to comment.