Bug 828480 - Add null check for mSuggestionsOptInPrompt. r=mfinkle

This commit is contained in:
Brian Nicholson 2013-01-15 16:55:03 -08:00
Родитель 21a3b095df
Коммит 6e574eb7d1
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -627,6 +627,14 @@ public class AllPagesTab extends AwesomeBarTab implements GeckoEventListener {
}
private void setSuggestionsEnabled(final boolean enabled) {
// Clicking the yes/no buttons quickly can cause the click events be
// queued before the listeners are removed above, so it's possible
// setSuggestionsEnabled() can be called twice. mSuggestionsOptInPrompt
// can be null if this happens (bug 828480).
if (mSuggestionsOptInPrompt == null) {
return;
}
// Make suggestions appear immediately after the user opts in
primeSuggestions();