diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/misc/extension/SharedExtensionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/shared/misc/extension/SharedExtensionPatch.kt index 33c3ddf154..7460ddd111 100644 --- a/patches/src/main/kotlin/app/revanced/patches/shared/misc/extension/SharedExtensionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/shared/misc/extension/SharedExtensionPatch.kt @@ -20,7 +20,7 @@ fun sharedExtensionPatch( extendWith("extensions/shared.rve") execute { - if (classBy { EXTENSION_CLASS_DESCRIPTOR in it.type } == null) { + if (classes.none { EXTENSION_CLASS_DESCRIPTOR == it.type }) { throw PatchException( "Shared extension has not been merged yet. This patch can not succeed without merging it.", ) @@ -35,7 +35,7 @@ fun sharedExtensionPatch( */ fun getCurrentJarFilePath(): String { val className = object {}::class.java.enclosingClass.name.replace('.', '/') + ".class" - val classUrl = object {}::class.java.classLoader.getResource(className) + val classUrl = object {}::class.java.classLoader?.getResource(className) if (classUrl != null) { val urlString = classUrl.toString()