Skip to content

Commit a50a314

Browse files
committed
fix(android): NPE fix
1 parent 3169c45 commit a50a314

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugin/platforms/android/java/com/nativescript/label/HtmlToSpannedConverter.java

+4
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ private void start(SpannableStringBuilder text, Object mark) {
114114
}
115115

116116
private void end(SpannableStringBuilder text, Class kind, Object repl) {
117+
117118
int len = text.length();
118119
Object obj = getLast(text, kind);
119120
int where = text.getSpanStart(obj);
120121
text.removeSpan(obj);
122+
if (repl == null) {
123+
return;
124+
}
121125
if (where != len) {
122126
if (Collection.class.isAssignableFrom(repl.getClass())) {
123127
Collection<Object> col = (Collection<Object>) repl;

0 commit comments

Comments
 (0)