From fe95aa2c90ddd9116f545c77e00cb5eec99fe486 Mon Sep 17 00:00:00 2001 From: Paulo Poiati Date: Wed, 16 Feb 2022 14:02:38 -0300 Subject: Fix extension registration order. --- core/extension/native_extension.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/extension') diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 1512852234..e1db99fe5d 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -295,9 +295,10 @@ NativeExtension::InitializationLevel NativeExtension::get_minimum_library_initia ERR_FAIL_COND_V(library == nullptr, INITIALIZATION_LEVEL_CORE); return InitializationLevel(initialization.minimum_initialization_level); } + void NativeExtension::initialize_library(InitializationLevel p_level) { ERR_FAIL_COND(library == nullptr); - ERR_FAIL_COND(p_level <= int32_t(level_initialized)); + ERR_FAIL_COND_MSG(p_level <= int32_t(level_initialized), vformat("Level '%d' must be higher than the current level '%d'", p_level, level_initialized)); level_initialized = int32_t(p_level); -- cgit v1.2.3