summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/progress_dialog.cpp5
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);