summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2024-09-25 15:05:19 -0400
committerGitHub <noreply@github.com>2024-09-25 15:05:19 -0400
commit4bc1546596994c3f6e82b0be421c82f6fbf86a86 (patch)
tree553756033d3ee4758c8c5a7dd690f4fbf1d589ea /Source/Core
parente9e4ae5a3445abd4e170a4dc2888726362b285fd (diff)
parentb34b7f63eeb784d36444514955a26a045f491c9b (diff)
Merge pull request #13071 from Pokechu22/cheat-search-crash
Fix random crash when using the cheat search
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt/CheatSearchWidget.cpp4
1 files changed, 3 insertions, 1 deletions
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<Cheats::FilterType>();
@@ -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)
{