fixed NPE of StatusComposeEditText in preview mode

This commit is contained in:
Mariotaku Lee 2015-04-04 00:02:37 +08:00
parent d952629ac2
commit cd2a35d6b7
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ public class StatusComposeEditText extends ThemedMultiAutoCompleteTextView imple
@Override @Override
protected void onAttachedToWindow() { protected void onAttachedToWindow() {
super.onAttachedToWindow(); super.onAttachedToWindow();
if (!isInEditMode() && mAdapter == null || mAdapter.isCursorClosed()) { if (!isInEditMode() && (mAdapter == null || mAdapter.isCursorClosed())) {
mAdapter = new UserHashtagAutoCompleteAdapter(this); mAdapter = new UserHashtagAutoCompleteAdapter(this);
} }
setAdapter(mAdapter); setAdapter(mAdapter);