Add a null check in an AutoCompleteTextView callback to prevent a crash.

It looks like the drop down list had already been taken down before the
callback fired so it caused a null pointer exception.  In this case just
do nothing instead.

Bug 1927858
This commit is contained in:
Eric Fischer
2009-06-26 16:14:59 -07:00
parent d09f86ce17
commit d072154bdd

View File

@@ -1202,7 +1202,11 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
int position, long id) {
if (position != -1) {
mDropDownList.mListSelectionHidden = false;
DropDownListView dropDownList = mDropDownList;
if (dropDownList != null) {
dropDownList.mListSelectionHidden = false;
}
}
}