diff options
Diffstat (limited to 'core/extension/native_extension.cpp')
-rw-r--r-- | core/extension/native_extension.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 5738b42049..ac9d2ca8a6 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -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() { |