Skip to content

Commit

Permalink
Debugger: Fixes crash selecting a filter search with new search button
Browse files Browse the repository at this point in the history
Fixes crash issues when trying to use a search comparison that requires prior results with the New Search button instead of Filter Search.
  • Loading branch information
Daniel-McCarthy committed Mar 11, 2024
1 parent e779167 commit 1f99473
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pcsx2-qt/Debugger/MemorySearchWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,15 @@ void MemorySearchWidget::onSearchButtonClicked()
return;
}

if (!isFilterSearch && (searchComparison == SearchComparison::Changed || searchComparison == SearchComparison::ChangedBy
|| searchComparison == SearchComparison::Decreased || searchComparison == SearchComparison::DecreasedBy
|| searchComparison == SearchComparison::Increased || searchComparison == SearchComparison::IncreasedBy
|| searchComparison == SearchComparison::NotChanged))
{
QMessageBox::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
return;
}

QFutureWatcher<std::vector<SearchResult>>* workerWatcher = new QFutureWatcher<std::vector<SearchResult>>();
auto onSearchFinished = [this, workerWatcher] {
m_ui.btnSearch->setDisabled(false);
Expand Down

0 comments on commit 1f99473

Please sign in to comment.