Prevent crash

This commit is contained in:
M66B 2020-05-16 19:35:46 +02:00
parent 32b4e135f3
commit 120d27145d
1 changed files with 7 additions and 6 deletions

View File

@ -1934,6 +1934,7 @@ public class HtmlHelper {
String value = param.substring(semi + 1);
switch (key) {
case "color":
if (!TextUtils.isEmpty(value))
try {
int color = Integer.parseInt(value.substring(1), 16) | 0xFF000000;
ssb.setSpan(new ForegroundColorSpan(color), start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);