Fix crash : do not remove deallocated observer

This commit is contained in:
Benjamin Reis 2017-03-07 10:17:10 +01:00
parent 68b319527f
commit e35415efc1

View file

@ -222,7 +222,9 @@
}
- (void)viewWillDisappear:(BOOL)animated {
[_tableController.tableView removeObserver:self forKeyPath:@"contentSize"];
if (_tableController && _tableController.tableView && [_tableController.tableView observationInfo]) {
[_tableController.tableView removeObserver:self forKeyPath:@"contentSize"];
}
[super viewWillDisappear:animated];
PhoneMainView.instance.currentName = NULL;
if (self.tmpContact) {