зеркало из https://github.com/mozilla/gecko-dev.git
Bug 828480 - Add null check for mSuggestionsOptInPrompt. r=mfinkle
This commit is contained in:
Родитель
21a3b095df
Коммит
6e574eb7d1
|
@ -627,6 +627,14 @@ public class AllPagesTab extends AwesomeBarTab implements GeckoEventListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setSuggestionsEnabled(final boolean enabled) {
|
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
|
// Make suggestions appear immediately after the user opts in
|
||||||
primeSuggestions();
|
primeSuggestions();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче