Fix NPE in Html.inParagraph()

The typeface in a TypefaceSpan can be the null string. This patch
fixes the string comparison to not throw a NullPointerException.

Bug: 20849738
Change-Id: Ied049305794966bcbca00cfd11fe97a91b685d79
This commit is contained in:
Raph Levien
2015-05-05 10:13:54 -07:00
parent 5551aca2b8
commit 8e71a397c6

View File

@@ -278,7 +278,7 @@ public class Html {
if (style[j] instanceof TypefaceSpan) {
String s = ((TypefaceSpan) style[j]).getFamily();
if (s.equals("monospace")) {
if ("monospace".equals(s)) {
out.append("<tt>");
}
}