diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-01-14 10:59:28 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-01-14 11:00:05 -0300 |
commit | 4bb0080b3df28a3003bfffd6285602664a4279c9 (patch) | |
tree | 5d73152adb5a1cae699fcbbceb2d79355378ac75 /editor | |
parent | c6b587636b1e3cf27e566e6e5b10859316cbefb6 (diff) |
Do not allow adding tasks while in the middle of flushing a message queue
Diffstat (limited to 'editor')
-rw-r--r-- | editor/progress_dialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index d2378f33ed..5fdc725f50 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -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); |