Skip to content

Commit 1c532e8

Browse files
committed
solves a NPE after updating dependencies in which this method gets called in super() instantiation before the mTokenizer variable is instantiated
1 parent b93a823 commit 1c532e8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Simplenote/src/main/java/com/automattic/simplenote/widgets/SimplenoteEditText.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ public boolean enoughToFilter() {
7373
return false;
7474
}
7575

76+
// solves a crash after updating dependencies in which this method
77+
// gets called in super() instantiation before the mTokenizer variable
78+
// is instantiated
79+
if (mTokenizer == null) {
80+
return false;
81+
}
82+
7683
int start = mTokenizer.findTokenStart(text, end);
7784
return start > 0 && end - start >= 1;
7885
}

0 commit comments

Comments
 (0)