Skip to content

Commit

Permalink
Fixed NPE when processing an empty link
Browse files Browse the repository at this point in the history
  • Loading branch information
dlew committed Sep 4, 2015
1 parent 7e94b0c commit 33b9c0e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ else if (element.getParent() != null
case LINK:
case AUTOLINK:
String link = element.getAttribute("link");
if (Patterns.EMAIL_ADDRESS.matcher(link).matches()) {
if (!TextUtils.isEmpty(link) && Patterns.EMAIL_ADDRESS.matcher(link).matches()) {
link = "mailto:" + link;
}
setSpan(builder, new URLSpan(link));
Expand Down

0 comments on commit 33b9c0e

Please sign in to comment.