Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d072154b authored by Eric Fischer's avatar Eric Fischer
Browse files

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
parent d09f86ce
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
                        }
                    }
                }