summaryrefslogtreecommitdiff
path: root/core/extension
diff options
context:
space:
mode:
authorPaulo Poiati <paulogpoiati@gmail.com>2022-02-16 14:02:38 -0300
committerPaulo Poiati <paulogpoiati@gmail.com>2022-02-20 10:58:46 -0300
commitfe95aa2c90ddd9116f545c77e00cb5eec99fe486 (patch)
treef4a5a58a2ba97419fd2f1244b6080ed07062082d /core/extension
parent499eec13a3660f6f05a6212be97ea164fd98b519 (diff)
Fix extension registration order.
Diffstat (limited to 'core/extension')
-rw-r--r--core/extension/native_extension.cpp3
1 files changed, 2 insertions, 1 deletions
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);