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

This commit is contained in:
Brian Nicholson 2013-01-15 16:55:03 -08:00
parent 1fb9f9a68c
commit ea571e862d

View File

@ -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();