Just to be sure.

This commit is contained in:
aminecmi 2019-01-14 19:39:54 +01:00
parent 592fb6328a
commit 69da932ab5

View File

@ -127,10 +127,12 @@ class ArticleFragment : Fragment() {
font = prefs.getString("reader_font", "")
if (font.isNotEmpty()) {
resId = context!!.resources.getIdentifier(font, "font", context!!.packageName)
try {
typeface = ResourcesCompat.getFont(context!!, resId)!!
typeface = try {
ResourcesCompat.getFont(context!!, resId)!!
} catch (e: java.lang.Exception) {
ACRA.getErrorReporter().maybeHandleSilentException(Throwable("Font loading issue: ${e.message}"), context!!)
// Just to be sure
null
}
}