diff --git a/src/main/kotlin/io/github/deficuet/unitykt/internal/impl/PPtrImpl.kt b/src/main/kotlin/io/github/deficuet/unitykt/internal/impl/PPtrImpl.kt index 39f3ee80..1874e79b 100644 --- a/src/main/kotlin/io/github/deficuet/unitykt/internal/impl/PPtrImpl.kt +++ b/src/main/kotlin/io/github/deficuet/unitykt/internal/impl/PPtrImpl.kt @@ -91,6 +91,7 @@ internal class PPtrImpl: PPtr { @PublishedApi internal inline fun PPtrImpl.safeGetObjInternal(): T? { + if (isNull) return null val cache = getCache() if (cache != null) return cache return getAssetFile()?.let {