diff --git a/Userland/Applications/Assistant/Providers.cpp b/Userland/Applications/Assistant/Providers.cpp index 190b1fe5de0..f2a8c590ea4 100644 --- a/Userland/Applications/Assistant/Providers.cpp +++ b/Userland/Applications/Assistant/Providers.cpp @@ -164,7 +164,7 @@ void FileProvider::build_filesystem_cache() m_work_queue.enqueue("/"); (void)Threading::BackgroundAction::construct( - [this](auto&) { + [this, strong_ref = NonnullRefPtr(*this)](auto&) { String slash = "/"; auto timer = Core::ElapsedTimer::start_new(); while (!m_work_queue.is_empty()) {