diff --git a/astatine/src/main/java/ceneax/app/lib/astatine/core/AtInitSlots.kt b/astatine/src/main/java/ceneax/app/lib/astatine/core/AtInitSlots.kt index 6935fc3..d0616a9 100644 --- a/astatine/src/main/java/ceneax/app/lib/astatine/core/AtInitSlots.kt +++ b/astatine/src/main/java/ceneax/app/lib/astatine/core/AtInitSlots.kt @@ -22,13 +22,15 @@ internal class ParamAtInitSlots : AtInitSlots { } bundle?.keySet()?.forEach { - val filed = control.state::class.java.getDeclaredField(it) - if (!filed.isAnnotationPresent(Param::class.java)) { - return@forEach + runCatching { + val filed = control.state::class.java.getDeclaredField(it) + if (!filed.isAnnotationPresent(Param::class.java)) { + return@forEach + } + + filed.isAccessible = true + filed.set(control.state, bundle[it]) } - - filed.isAccessible = true - filed.set(control.state, bundle[it]) } } }