diff --git a/Userland/Libraries/LibThreading/BackgroundAction.h b/Userland/Libraries/LibThreading/BackgroundAction.h index 18b346b154..d169ae4aa3 100644 --- a/Userland/Libraries/LibThreading/BackgroundAction.h +++ b/Userland/Libraries/LibThreading/BackgroundAction.h @@ -66,8 +66,8 @@ private: enqueue_work([this] { m_result = m_action(*this); if (m_on_complete) { - Core::EventLoop::current().post_event(*this, make([this, result = m_result.release_value()](auto&) { - m_on_complete(result); + Core::EventLoop::current().post_event(*this, make([this](auto&) { + m_on_complete(m_result.release_value()); this->remove_from_parent(); })); Core::EventLoop::wake();