[fix] [ios] Workaround for reload with outdated SearchIndex.

This commit is contained in:
Ilya Grechuhin 2017-08-11 11:32:47 +03:00 committed by Sergey Yershov
parent 106083717a
commit 54143ac26e

View file

@ -82,6 +82,11 @@
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([MWMSearch resultsCount] == 0)
{
NSAssert(false, @"Invalid reload with outdated SearchIndex");
return [tableView dequeueReusableCellWithCellClass:[MWMSearchCommonCell class] indexPath:indexPath];
}
auto const row = indexPath.row;
auto const containerIndex = [MWMSearch containerIndexWithRow:row];
switch ([MWMSearch resultTypeWithRow:row])