Qt/CodeViewWidget: Don't read PC in Update() if we don't have a CPU thread guard.

This commit is contained in:
Admiral H. Curtiss 2023-02-20 03:10:12 +01:00
parent ef1520c2c6
commit 4e6c89fbfd
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ void CodeViewWidget::Update(const Core::CPUThreadGuard* guard)
for (int i = 0; i < rows; i++)
setRowHeight(i, rowh);
u32 pc = PowerPC::ppcState.pc;
const std::optional<u32> pc = guard ? std::make_optional(PowerPC::ppcState.pc) : std::nullopt;
const bool dark_theme = qApp->palette().color(QPalette::Base).valueF() < 0.5;