mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202583 - crash in java.lang.NullPointerException: Attempt to read from field ''java.lang.String org.mozilla.gecko.home.SearchEngine.name'' on a null object reference.r=mfinkle
This commit is contained in:
parent
3cfa3e89c4
commit
9c6700e443
@ -161,7 +161,7 @@ class SearchEngineRow extends AnimatedHeightLayout {
|
||||
mUserEnteredTextView.setText(searchTerm);
|
||||
|
||||
// mSearchEngine is not set in the first call to this method; the content description
|
||||
// is instead initially set in updateFromSearchEngine.
|
||||
// is instead initially set in updateSuggestions().
|
||||
if (mSearchEngine != null) {
|
||||
setDescriptionOnSuggestion(mUserEnteredTextView, searchTerm);
|
||||
}
|
||||
@ -243,10 +243,7 @@ class SearchEngineRow extends AnimatedHeightLayout {
|
||||
hideRecycledSuggestions(suggestionCounter, recycledSuggestionCount);
|
||||
}
|
||||
|
||||
private int updateFromSearchEngine(SearchEngine searchEngine, boolean animate, int recycledSuggestionCount) {
|
||||
// Update search engine reference.
|
||||
mSearchEngine = searchEngine;
|
||||
|
||||
private int updateFromSearchEngine(boolean animate, int recycledSuggestionCount) {
|
||||
// Set the search engine icon (e.g., Google) for the row.
|
||||
mIconView.updateAndScaleImage(mSearchEngine.getIcon(), mSearchEngine.getEngineIdentifier());
|
||||
|
||||
@ -271,10 +268,12 @@ class SearchEngineRow extends AnimatedHeightLayout {
|
||||
}
|
||||
|
||||
public void updateSuggestions(boolean suggestionsEnabled, SearchEngine searchEngine, String searchTerm, boolean animate) {
|
||||
// Update search engine reference. Even if the user has not seen the prompt, we need to set the engine for the mSearchTerm suggestion
|
||||
mSearchEngine = searchEngine;
|
||||
// This can be called before the opt-in permission prompt is shown or set. Check first.
|
||||
if (suggestionsEnabled) {
|
||||
final int recycledSuggestionCount = mSuggestionView.getChildCount();
|
||||
final int suggestionViewCount = updateFromSearchEngine(searchEngine, animate, recycledSuggestionCount);
|
||||
final int suggestionViewCount = updateFromSearchEngine(animate, recycledSuggestionCount);
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
updateFromSavedSearches(searchTerm, animate, suggestionViewCount, recycledSuggestionCount);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user