From f493f4ee90d04c530c00cb93a86452880b97bcd2 Mon Sep 17 00:00:00 2001 From: vng Date: Fri, 19 Oct 2012 01:38:26 +0300 Subject: [PATCH] [iOS] Fix crash when many bookmarks in the list (header cell with category isn't visible). --- iphone/Maps/Bookmarks/BookmarksVC.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index 7489033465..3113074a72 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -328,8 +328,12 @@ [m_locationManager stop:self]; // Save possibly edited set name UITableViewCell * cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; - NSString * newName = ((UITextField *)[cell.contentView viewWithTag:TEXTFIELD_TAG]).text; - [self renameBMCategoryIfChanged:newName]; + if (cell != nil) + { + NSString * newName = ((UITextField *)[cell.contentView viewWithTag:TEXTFIELD_TAG]).text; + [self renameBMCategoryIfChanged:newName]; + } + [super viewWillDisappear:animated]; }