Skip to content

Commit b2b0db2

Browse files
Jean-Baptiste QueruAndroid Code Review
authored andcommitted
Merge "SearchDialog: Fix for NullpointerException while using Suggestions in Browser"
2 parents e2ec61b + b00d41a commit b2b0db2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/java/android/app/SearchDialog.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,9 @@ protected boolean launchSuggestion(int position) {
11071107
* @return true if a successful launch, false if could not (e.g. bad position).
11081108
*/
11091109
protected boolean launchSuggestion(int position, int actionKey, String actionMsg) {
1110+
if (mSuggestionsAdapter == null) {
1111+
return false;
1112+
}
11101113
Cursor c = mSuggestionsAdapter.getCursor();
11111114
if ((c != null) && c.moveToPosition(position)) {
11121115

0 commit comments

Comments
 (0)