summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeequlim <geequlim@gmail.com>2018-02-21 19:28:26 +0800
committergeequlim <geequlim@gmail.com>2018-02-21 19:28:26 +0800
commitcfde7374785d2e4033ebcee0459836c648439eb6 (patch)
treeb13cdca963f147e9d766c4ab3e174802515e8e88
parent222516a8154f4b0dbe1264315337367b60989c9e (diff)
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.
-rw-r--r--editor/script_editor_debugger.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 4fc73b2a8e..36df5f6ccc 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -1285,14 +1285,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() {