Fix according to code review.

This commit is contained in:
vng 2012-10-19 14:23:56 +03:00 committed by Alex Zolotarev
parent 4c53d5c0e8
commit d6736a0ec7

View file

@ -326,13 +326,12 @@
- (void)viewWillDisappear:(BOOL)animated
{
[m_locationManager stop:self];
// Save possibly edited set name
UITableViewCell * cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
if (cell != nil)
{
NSString * newName = ((UITextField *)[cell.contentView viewWithTag:TEXTFIELD_TAG]).text;
NSString * newName = ((UITextField *)[cell.contentView viewWithTag:TEXTFIELD_TAG]).text;
if (newName)
[self renameBMCategoryIfChanged:newName];
}
[super viewWillDisappear:animated];
}