diff --git a/Libraries/LibThreading/BackgroundAction.h b/Libraries/LibThreading/BackgroundAction.h index 263b94f6741..2a6c05cd7f3 100644 --- a/Libraries/LibThreading/BackgroundAction.h +++ b/Libraries/LibThreading/BackgroundAction.h @@ -65,7 +65,7 @@ private: promise->on_resolution = [](NonnullRefPtr& object) -> ErrorOr { auto self = static_ptr_cast>(object); VERIFY(self->m_result.has_value()); - if (auto maybe_error = self->m_on_complete(self->m_result.value()); maybe_error.is_error()) + if (auto maybe_error = self->m_on_complete(self->m_result.release_value()); maybe_error.is_error()) self->m_on_error(maybe_error.release_error()); return {};