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