diff --git a/YLMoment/YLMomentObject.m b/YLMoment/YLMomentObject.m index 64320d4..0251e9e 100644 --- a/YLMoment/YLMomentObject.m +++ b/YLMoment/YLMomentObject.m @@ -54,7 +54,11 @@ - (id)initProxy; @implementation YLMoment - (void)dealloc { - [self removeObserver:self forKeyPath:@"locale"]; + @try { + [self removeObserver:self forKeyPath:@"locale"]; + } @catch(id exception) { + NSLog(@"YLMoment warning: %@", exception); + } } #pragma mark - Creating and Initializing Moment Objects