Do not allow adding tasks while in the middle of flushing a message queue
This commit is contained in:
parent
c6b587636b
commit
4bb0080b3d
3 changed files with 18 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue