diff --git a/base/base_tests/worker_thread_tests.cpp b/base/base_tests/worker_thread_tests.cpp index 309112bf00..715f5852c9 100644 --- a/base/base_tests/worker_thread_tests.cpp +++ b/base/base_tests/worker_thread_tests.cpp @@ -77,9 +77,9 @@ UNIT_TEST(WorkerThread_PushFromPendingTask) auto f = p.get_future(); WorkerThread thread; - bool const rv = thread.Push([&]() { + bool const rv = thread.Push([&f, &thread]() { f.get(); - bool const rv = thread.Push([&]() { TEST(false, ("This task should not be executed")); }); + bool const rv = thread.Push([]() { TEST(false, ("This task should not be executed")); }); TEST(!rv, ()); }); TEST(rv, ());