Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e71a397 authored by Raph Levien's avatar Raph Levien
Browse files

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
parent 5551aca2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>");
                    }
                }