Skip to content

Commit b00d41a

Browse files
author
Deepika Sai Amuri
committed
SearchDialog: Fix for NullpointerException while using Suggestions in
Browser Change-Id: Ic208ae51e4f7678363ea6d7de9db97707713bf6d
1 parent e2ec61b commit b00d41a

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)