Bug Fix: Remove observer cleanup
Apparently, this isn't needed, and on two users reporting crashes, actually causes exceptions to be thrown somewhere. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
b8580cf193
commit
62010394ef
2 changed files with 0 additions and 7 deletions
|
@ -40,7 +40,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
#endif
|
||||
|
||||
BOOL halveDSDVolume;
|
||||
BOOL observersAdded;
|
||||
|
||||
void *hdcd_decoder;
|
||||
|
||||
|
|
|
@ -402,8 +402,6 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes
|
|||
halveDSDVolume = NO;
|
||||
|
||||
[[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.halveDSDVolume" options:(NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew) context:kChunkListContext];
|
||||
|
||||
observersAdded = YES;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -431,10 +429,6 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes
|
|||
if(tempData) {
|
||||
free(tempData);
|
||||
}
|
||||
if(observersAdded) {
|
||||
[[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKeyPath:@"values.halveDSDVolume" context:kChunkListContext];
|
||||
observersAdded = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
|
||||
|
|
Loading…
Reference in a new issue