We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebb84f8 commit ff8ed4cCopy full SHA for ff8ed4c
library/src/main/java/com/tokenautocomplete/TokenCompleteTextView.java
@@ -543,9 +543,9 @@ public boolean enoughToFilter() {
543
544
@Override
545
public void performCompletion() {
546
- if (getListSelection() == ListView.INVALID_POSITION && enoughToFilter()) {
+ if ((getAdapter() == null || getListSelection() == ListView.INVALID_POSITION) && enoughToFilter()) {
547
Object bestGuess;
548
- if (getAdapter().getCount() > 0 && performBestGuess) {
+ if (getAdapter() != null && getAdapter().getCount() > 0 && performBestGuess) {
549
bestGuess = getAdapter().getItem(0);
550
} else {
551
bestGuess = defaultObject(currentCompletionText());
0 commit comments