Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit 91ddb4f

Browse files
authored
Merge pull request #85 from vikulin/master
NPE fix in class loader
2 parents d34c316 + 95d48cf commit 91ddb4f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
applicationId "io.github.chronosx88.yggdrasil"
1212
minSdkVersion 15
1313
targetSdkVersion 33
14-
versionCode 41
15-
versionName "2.1.5"
14+
versionCode 42
15+
versionName "2.1.6"
1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
setProperty("archivesBaseName", project.getParent().name+"-"+versionName)
1818

app/src/main/java/org/yggdrasil/app/crispa/MainActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ class MainActivity : AppCompatActivity() {
212212
val sourceDir: String = this.applicationInfo.sourceDir
213213
val dexFile = DexFile(sourceDir)
214214
val cl = classLoader
215-
if (cl != null) {
215+
try {
216216
val c: Class<*> = dexFile.loadClass("dummy/Dummy", cl)
217+
} catch (_: NullPointerException){
218+
//there is nothing we can do
217219
}
218220
}
219221
val versionName = findViewById<Button>(R.id.about)

0 commit comments

Comments
 (0)