diff options
author | Daylily-Zeleen <daylily-zeleen@foxmail.com> | 2024-01-01 19:48:28 +0800 |
---|---|---|
committer | Daylily-Zeleen <daylily-zeleen@foxmail.com> | 2024-01-01 20:01:57 +0800 |
commit | fe6b07381189adb57dbc78150eab602044d541d0 (patch) | |
tree | d6165ce6de632475f76a4de13d462ec3db8d9225 /platform/ios | |
parent | 13a0d6e9b253654f5cc2a44f3d0b3cae10440443 (diff) | |
download | redot-engine-fe6b07381189adb57dbc78150eab602044d541d0.tar.gz |
Distinguishs between dynamic library not found and can't be opened.
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/os_ios.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm index a646705305..80f1f4a5c2 100644 --- a/platform/ios/os_ios.mm +++ b/platform/ios/os_ios.mm @@ -257,6 +257,8 @@ Error OS_IOS::open_dynamic_library(const String p_path, void *&p_library_handle, path = get_framework_executable(get_executable_path().get_base_dir().path_join("Frameworks").path_join(p_path.get_file().get_basename() + ".framework")); } + ERR_FAIL_COND_V(!FileAccess::exists(path), ERR_FILE_NOT_FOUND); + p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW); ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror())); |