Skip to content

Commit

Permalink
Merge pull request #5 from joaortk/master
Browse files Browse the repository at this point in the history
Fix checking for null drawable
  • Loading branch information
cleber-henriques-ilegra committed Aug 17, 2017
2 parents 14be1f8 + 9fa391b commit 07996dc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ public boolean onTouchEvent(MotionEvent event) {
}

private boolean insideClearButton(MotionEvent event) {
return (event.getRawX() >= (getRight() - getCompoundDrawables()[DRAWABLE_RIGHT].getBounds().width()));
return getCompoundDrawables()[DRAWABLE_RIGHT] != null && (event.getRawX() >= (getRight() - getCompoundDrawables()[DRAWABLE_RIGHT].getBounds().width()));
}

private int checkLength(CharSequence text) {
Expand Down

0 comments on commit 07996dc

Please sign in to comment.