allowing no typeface if view created from code

This commit is contained in:
Gavriil Sitnikov 2016-03-29 20:40:01 +03:00
parent b56206f7df
commit 9cf09386c4
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public final class TypefacedViewHelper {
final Typeface typeface = typefacedText.getTypeface();
typefacedText.setTypeface(customTypeface, typeface == null ? Typeface.NORMAL : typeface.getStyle());
}
} else if (!allowEmptyCustomTypeface) {
} else if (attrs != null && !allowEmptyCustomTypeface) {
Lc.assertion("TypefacedText has no customTypeface attribute: " + typefacedText);
}
}