Skip to content

Commit

Permalink
fix exception when load dll
Browse files Browse the repository at this point in the history
  • Loading branch information
Deficuet committed Jun 12, 2022
1 parent 7a42234 commit 762de17
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/kotlin/io/github/deficuet/unitykt/util/NativeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ class NativeUtils private constructor() {
try {
System.load(tempFile.absolutePath)
} finally {
if (isPosix) {
tempFile.delete()
} else {
tempFile.deleteOnExit()
}
try {
if (isPosix) {
tempFile.delete()
} else {
tempFile.deleteOnExit()
}
} catch (_: Throwable) { }
}
}
}
Expand Down

0 comments on commit 762de17

Please sign in to comment.