| 608 | } |
| 609 | |
| 610 | EditorProgressGDDC::~EditorProgressGDDC() { |
| 611 | // if no EditorNode... |
| 612 | if (GDREProgressDialog::get_singleton()) { |
| 613 | GDREProgressDialog::get_singleton()->end_task(task); |
| 614 | } else { |
| 615 | #ifdef TOOLS_ENABLED |
| 616 | if (EditorNode::get_singleton()) { |
| 617 | if (Thread::is_main_thread()) { |
| 618 | EditorNode::progress_end_task(task); |
| 619 | } else { |
| 620 | EditorNode::progress_end_task_bg(task); |
| 621 | } |
| 622 | } |
| 623 | #endif |
| 624 | } |
| 625 | } |