[FIX] Fix NPE with nativePath PR #719

This commit is contained in:
Gravita 2024-11-05 07:08:31 +07:00
parent a1af61a599
commit 926094076c
No known key found for this signature in database
GPG key ID: 543A8F335C9CD633
2 changed files with 6 additions and 0 deletions

View file

@ -123,6 +123,9 @@ protected Class<?> findClass(String name) throws ClassNotFoundException {
@Override
public String findLibrary(String name) {
if(nativePath == null) {
return null;
}
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
}

View file

@ -262,6 +262,9 @@ protected Class<?> findClass(String moduleName, String name) {
@Override
public String findLibrary(String name) {
if(nativePath == null) {
return null;
}
return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION);
}