Fix crash when attempting to analyze a FIFO after stopping playback

This commit is contained in:
Pokechu22 2021-02-12 18:49:23 -08:00
parent 58333d6feb
commit a557230dea
2 changed files with 10 additions and 0 deletions

View File

@ -165,6 +165,9 @@ void FIFOAnalyzer::UpdateDetails()
m_detail_list->clear();
m_object_data_offsets.clear();
if (!FifoPlayer::GetInstance().IsPlaying())
return;
auto items = m_tree_widget->selectedItems();
if (items.isEmpty() || items[0]->data(0, OBJECT_ROLE).isNull())
@ -316,6 +319,9 @@ void FIFOAnalyzer::BeginSearch()
{
QString search_str = m_search_edit->text();
if (!FifoPlayer::GetInstance().IsPlaying())
return;
auto items = m_tree_widget->selectedItems();
if (items.isEmpty() || items[0]->data(0, FRAME_ROLE).isNull())
@ -462,6 +468,9 @@ void FIFOAnalyzer::UpdateDescription()
{
m_entry_detail_browser->clear();
if (!FifoPlayer::GetInstance().IsPlaying())
return;
auto items = m_tree_widget->selectedItems();
if (items.isEmpty())

View File

@ -245,6 +245,7 @@ void FIFOPlayerWindow::OnEmulationStopped()
StopRecording();
UpdateControls();
m_analyzer->Update();
}
void FIFOPlayerWindow::OnRecordingDone()