From c5e893897e3613a05c24f350c3fc5993dfd12f35 Mon Sep 17 00:00:00 2001 From: Relintai <relintai@protonmail.com> Date: Thu, 15 Jun 2023 15:42:07 +0200 Subject: [PATCH] Changed 2 errors to just an if. --- scene/debugger/script_debugger_remote.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp index 9fec0212e..2ae748d04 100644 --- a/scene/debugger/script_debugger_remote.cpp +++ b/scene/debugger/script_debugger_remote.cpp @@ -836,7 +836,9 @@ void ScriptDebuggerRemote::_poll_events() { //this si called from ::idle_poll, happens only when running the game, //does not get called while on debug break - ERR_FAIL_COND(!Thread::is_main_thread()); + if (!Thread::is_main_thread()) { + return; + } //send over output_strings _get_output(); @@ -1043,7 +1045,9 @@ void ScriptDebuggerRemote::idle_poll() { // this function is called every frame, except when there is a debugger break (::debug() in this class) // execution stops and remains in the ::debug function - ERR_FAIL_COND(!Thread::is_main_thread()); + if (!Thread::is_main_thread()) { + return; + } _get_output();