Skip to content

Commit 812c03c

Browse files
authored
[MOBILE-4739] Fix typeface NPE (#1542)
1 parent 237c9f9 commit 812c03c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

urbanairship-automation/src/main/java/com/urbanairship/iam/view/InAppViewUtils.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ internal object InAppViewUtils {
159159
} else {
160160
textView.text = textInfo.text
161161
}
162-
var typefaceFlags = textView.typeface.style
162+
163+
var typefaceFlags = textView.typeface?.style ?: Typeface.NORMAL
163164
var paintFlags = textView.paintFlags or Paint.ANTI_ALIAS_FLAG or Paint.SUBPIXEL_TEXT_FLAG
164165
for (style in textInfo.style ?: emptyList()) {
165166
when (style) {

0 commit comments

Comments
 (0)