From 0cd9993ed5a953f720ba8bccaa225edf7aab4322 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Fri, 6 Oct 2017 12:30:54 +0700 Subject: Fix command-line export looping infinitely EditorProgress calls Main::iteration which calls MessageQueue::flush which may result in _fs_changed being called again. This fixes the loop Godot enters in such case. Fixes #11189 --- editor/editor_node.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index a04ded7b5b..baa174d387 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -373,6 +373,9 @@ void EditorNode::_fs_changed() { String err = "Preset \"" + export_defer.preset + "\" doesn't have a platform."; ERR_PRINT(err.utf8().get_data()); } else { + // ensures export_project does not loop infinitely, because notifications may + // come during the export + export_defer.preset = ""; platform->export_project(preset, export_defer.debug, export_defer.path, /*p_flags*/ 0); } } -- cgit v1.2.3