Commit e8e0c3b1 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Fix crash in NTP's most visited when removing all sites.

This crash only affects pre-ui-refresh, but it is safe to add
this fix for all experiments.

Bug: 881229
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Ic200f8dfac105b73fe8903b050249683d1f2d1c1
Reviewed-on: https://chromium-review.googlesource.com/1210162
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589183}
parent afdfb291
......@@ -365,7 +365,9 @@ NSString* const kContentSuggestionsCollectionUpdaterSnackbarCategory =
completion:nil];
}];
// Make sure we get the right index for the section.
// Make sure the section is still in the model and that the index is correct.
if (![model hasSectionForSectionIdentifier:sectionIdentifier])
return;
section = [model sectionForSectionIdentifier:sectionIdentifier];
[self.collectionViewController.collectionView
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment