Check nullability

This commit is contained in:
Mygod
2022-05-21 16:03:44 -04:00
parent fdf8252f94
commit 628107c583

View File

@@ -12,7 +12,7 @@ class ConstantLookup(private val prefix: String, private val lookup29: Array<out
private val lookup by lazy { private val lookup by lazy {
SparseArrayCompat<String>().apply { SparseArrayCompat<String>().apply {
for (field in clazz().declaredFields) try { for (field in clazz().declaredFields) try {
if (field.type == Int::class.java && field.name.startsWith(prefix)) put(field.getInt(null), field.name) if (field?.type == Int::class.java && field.name.startsWith(prefix)) put(field.getInt(null), field.name)
} catch (e: Exception) { } catch (e: Exception) {
Timber.w(e) Timber.w(e)
} }