[studio/modlib] Make TaskRunner check that task is not null

This commit is contained in:
Gary Talent 2024-06-02 14:08:23 -05:00
parent 2afade2447
commit 0dfa7c30e6

View File

@ -10,6 +10,7 @@ namespace studio {
void TaskRunner::update(turbine::Context &ctx) noexcept {
std::ignore = m_tasks.erase(std::remove_if(m_tasks.begin(), m_tasks.end(), [&](ox::UPtr<studio::Task> &t) {
if (!t) { return true; }
auto const done = t->update(ctx) == TaskState::Done;
if (done) {
t->finished.emit();