Use the getDeclaredField() method instead of objectInstance in ButtonImpl.kt

This commit is contained in:
Username404 2021-05-17 14:56:52 +02:00
parent 82de485b17
commit 39c6d8ebb1
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ sealed class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) {
((try {
it.getConstructor().newInstance()
} catch (e: NoSuchMethodException) {
it.kotlin.objectInstance!!
it.getDeclaredField("INSTANCE").get(null)
}) as ButtonImpl).let { impl ->
with(impl) {
if (info.kind == ButtonInfo.Companion.Type.TOGGLE) {