mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
Merge pull request #13071 from Pokechu22/cheat-search-crash
Fix random crash when using the cheat search
This commit is contained in:
commit
4bc1546596
@ -280,6 +280,8 @@ void CheatSearchWidget::ConnectWidgets()
|
|||||||
|
|
||||||
void CheatSearchWidget::OnNextScanClicked()
|
void CheatSearchWidget::OnNextScanClicked()
|
||||||
{
|
{
|
||||||
|
Core::CPUThreadGuard guard{m_system};
|
||||||
|
|
||||||
const bool had_old_results = m_session->WasFirstSearchDone();
|
const bool had_old_results = m_session->WasFirstSearchDone();
|
||||||
|
|
||||||
const auto filter_type = m_value_source_dropdown->currentData().value<Cheats::FilterType>();
|
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 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)
|
if (error_code == Cheats::SearchErrorCode::Success)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user