From 9febb6f74701688387ce4e89839d11f0772b424b Mon Sep 17 00:00:00 2001 From: geequlim Date: Wed, 21 Feb 2018 19:28:26 +0800 Subject: [PATCH] Don't print error message when select debugger stacks if the debugger is stopped. Clear debugger stack inspector if the debugger is stopped when selected stack changed. (cherry picked from commit cfde7374785d2e4033ebcee0459836c648439eb6) --- editor/script_editor_debugger.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 09cdb4ccc39..914090cc7ce 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -1277,14 +1277,14 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() { emit_signal("goto_script_line", stack_script, int(d["line"]) - 1); stack_script.unref(); - ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected_to_host()); - /// - - Array msg; - msg.push_back("get_stack_frame_vars"); - msg.push_back(d["frame"]); - ppeer->put_var(msg); + if (connection.is_valid() && connection->is_connected_to_host()) { + Array msg; + msg.push_back("get_stack_frame_vars"); + msg.push_back(d["frame"]); + ppeer->put_var(msg); + } else { + inspector->edit(NULL); + } } void ScriptEditorDebugger::_output_clear() {