mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
Distinguishs between dynamic library not found and can't be opened.
This commit is contained in:
parent
13a0d6e9b2
commit
fe6b073811
6 changed files with 12 additions and 4 deletions
|
|
@ -656,6 +656,8 @@ Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle
|
|||
path = get_executable_path().get_base_dir().path_join("../lib").path_join(p_path.get_file());
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(!FileAccess::exists(path), ERR_FILE_NOT_FOUND);
|
||||
|
||||
p_library_handle = dlopen(path.utf8().get_data(), GODOT_DLOPEN_MODE);
|
||||
ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue