瀏覽代碼

[Editor] Fix invalid run args when remote debug is unavailable.

Fabio Alessandrelli 2 年之前
父節點
當前提交
59e74374c0
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      editor/editor_run.cpp

+ 5 - 2
editor/editor_run.cpp

@@ -57,8 +57,11 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
 		args.push_back(resource_path.replace(" ", "%20"));
 	}
 
-	args.push_back("--remote-debug");
-	args.push_back(EditorDebuggerNode::get_singleton()->get_server_uri());
+	const String debug_uri = EditorDebuggerNode::get_singleton()->get_server_uri();
+	if (debug_uri.size()) {
+		args.push_back("--remote-debug");
+		args.push_back(debug_uri);
+	}
 
 	args.push_back("--editor-pid");
 	args.push_back(itos(OS::get_singleton()->get_process_id()));