You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Do not allow adding tasks while in the middle of flushing a message queue
This commit is contained in:
@@ -166,6 +166,11 @@ void ProgressDialog::_popup() {
|
||||
|
||||
void ProgressDialog::add_task(const String &p_task, const String &p_label, int p_steps, bool p_can_cancel) {
|
||||
|
||||
if (MessageQueue::get_singleton()->is_flushing()) {
|
||||
ERR_PRINT("Do not use progress dialog (task) while flushing the message queue or using call_deferred()!");
|
||||
return;
|
||||
}
|
||||
|
||||
ERR_FAIL_COND(tasks.has(p_task));
|
||||
ProgressDialog::Task t;
|
||||
t.vb = memnew(VBoxContainer);
|
||||
|
||||
Reference in New Issue
Block a user