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 9149b11973)
This commit is contained in:
Brian Richardson 2018-05-01 15:40:30 -07:00 committed by Hein-Pieter van Braam
parent 3491e776dd
commit ae32bcf4c3
1 changed files with 1 additions and 1 deletions

View File

@ -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; GDScriptLanguage::get_singleton()->script_frame_time += time_taken - function_call_time;
} }
#endif
if (ScriptDebugger::get_singleton()) if (ScriptDebugger::get_singleton())
GDScriptLanguage::get_singleton()->exit_function(); GDScriptLanguage::get_singleton()->exit_function();
#endif
if (_stack_size) { if (_stack_size) {
//free stack //free stack