Fix NativeExtension::open_library return value when the undelying lib fails to initialize
This commit is contained in:
parent
8df8fff54b
commit
228ce1d2b6
1 changed files with 6 additions and 3 deletions
|
@ -295,9 +295,12 @@ Error NativeExtension::open_library(const String &p_path, const String &p_entry_
|
|||
|
||||
GDNativeInitializationFunction initialization_function = (GDNativeInitializationFunction)entry_funcptr;
|
||||
|
||||
initialization_function(&gdnative_interface, this, &initialization);
|
||||
level_initialized = -1;
|
||||
return OK;
|
||||
if (initialization_function(&gdnative_interface, this, &initialization)) {
|
||||
level_initialized = -1;
|
||||
return OK;
|
||||
} else {
|
||||
return FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
void NativeExtension::close_library() {
|
||||
|
|
Loading…
Reference in a new issue