Skip to content

Commit

Permalink
fix crash #33 (NPE in SpannableStringInternal) by preventing setting…
Browse files Browse the repository at this point in the history
… null spans
  • Loading branch information
pchupik committed Feb 6, 2018
1 parent 739163e commit 1f762aa
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -142,8 +142,9 @@ void append(Item item) {
int start=content.length();

content.append(item.content);
content.setSpan(item.activeSpan, start, content.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
if (item.activeSpan != null)
content.setSpan(item.activeSpan, start, content.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}

Spannable getContent() {
Expand Down

0 comments on commit 1f762aa

Please sign in to comment.