CodeWidget bugfix: Prevemt updates that use CPUThreadGuard during boot, when the core isn't ready.

GetState will report the State as paused at a certain point during boot, which will allow an update that requires CPUThreadGuard. Since it's too early to create a guard, this will cause buggy behavior.  Normally this doesn't happen, but sometimes a commit will appear that triggers updates during boot.
This commit is contained in:
TryTwo 2024-05-31 18:46:37 -07:00
parent e0e09d1074
commit b7361207cb
2 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ void CodeViewWidget::Update()
if (m_updating)
return;
if (Core::GetState(m_system) == Core::State::Paused)
if (Core::GetState(m_system) == Core::State::Paused && Core::IsRunningAndStarted())
{
Core::CPUThreadGuard guard(m_system);
Update(&guard);

View File

@ -339,7 +339,7 @@ void CodeWidget::UpdateCallstack()
{
m_callstack_list->clear();
if (Core::GetState(m_system) != Core::State::Paused)
if (Core::GetState(m_system) != Core::State::Paused || !Core::IsRunningAndStarted())
return;
std::vector<Dolphin_Debugger::CallstackEntry> stack;