summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-04-28 11:09:12 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-04-28 11:09:12 +0200
commit7780926b25567d098c36439d8b12b1c6d4631f86 (patch)
treecc615120337a0c7f5caaec6808c811b15109460d /modules/gdscript/gdscript.cpp
parent578ca94ef6351cb6c31b1addf8b3c36577376bd4 (diff)
downloadredot-engine-7780926b25567d098c36439d8b12b1c6d4631f86.tar.gz
GDScript: Fix template_debug compilation with TOOLS/DEBUG macro mismatch
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 3bc11c69e9..d0790aba25 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -741,7 +741,7 @@ Error GDScript::reload(bool p_keep_state) {
bool can_run = ScriptServer::is_scripting_enabled() || is_tool();
-#ifdef DEBUG_ENABLED
+#ifdef TOOLS_ENABLED
if (p_keep_state && can_run && is_valid()) {
_save_old_static_data();
}
@@ -818,7 +818,7 @@ Error GDScript::reload(bool p_keep_state) {
}
}
-#ifdef DEBUG_ENABLED
+#ifdef TOOLS_ENABLED
if (can_run && p_keep_state) {
_restore_old_static_data();
}