diff --git a/Source/Core/DolphinQt/CheatSearchWidget.cpp b/Source/Core/DolphinQt/CheatSearchWidget.cpp index 3a4c024c97..df4cb8dd11 100644 --- a/Source/Core/DolphinQt/CheatSearchWidget.cpp +++ b/Source/Core/DolphinQt/CheatSearchWidget.cpp @@ -280,6 +280,8 @@ void CheatSearchWidget::ConnectWidgets() void CheatSearchWidget::OnNextScanClicked() { + Core::CPUThreadGuard guard{m_system}; + const bool had_old_results = m_session->WasFirstSearchDone(); const auto filter_type = m_value_source_dropdown->currentData().value(); @@ -304,7 +306,7 @@ void CheatSearchWidget::OnNextScanClicked() } const size_t old_count = m_session->GetResultCount(); - const Cheats::SearchErrorCode error_code = m_session->RunSearch(Core::CPUThreadGuard{m_system}); + const Cheats::SearchErrorCode error_code = m_session->RunSearch(guard); if (error_code == Cheats::SearchErrorCode::Success) {