From ae32bcf4c31047f65b1517c5b0a7655d83bf59dc Mon Sep 17 00:00:00 2001 From: Brian Richardson Date: Tue, 1 May 2018 15:40:30 -0700 Subject: [PATCH] Fix a crash when trying to run Godot debugger on a release build. The GDScriptLanguage::enter_function is wrapped in #ifdef DEBUG but the exit_function is not, resulting in a stack underflow error. (cherry picked from commit 9149b119733aa9444a59c6940e7d8b875dfc31e8) --- modules/gdscript/gdscript_function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index f83bec0c7ff..623cd1eb9ba 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1311,9 +1311,9 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a GDScriptLanguage::get_singleton()->script_frame_time += time_taken - function_call_time; } -#endif if (ScriptDebugger::get_singleton()) GDScriptLanguage::get_singleton()->exit_function(); +#endif if (_stack_size) { //free stack