diff --git a/src/main/kotlin/io/github/deficuet/unitykt/util/NativeUtils.kt b/src/main/kotlin/io/github/deficuet/unitykt/util/NativeUtils.kt index c70040ef..b935c5ea 100644 --- a/src/main/kotlin/io/github/deficuet/unitykt/util/NativeUtils.kt +++ b/src/main/kotlin/io/github/deficuet/unitykt/util/NativeUtils.kt @@ -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) { } } } }