summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-02-20 03:10:12 +0100
committerAdmiral H. Curtiss <pikachu025@gmail.com>2023-02-20 03:10:12 +0100
commit4e6c89fbfd0e0495163d609d745d92e7c1449a9d (patch)
tree7c578c4385316c03c0a3ed63d8c9f38a67aba359 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parentef1520c2c686172e380fdc9c58a01299216b55b0 (diff)
Qt/CodeViewWidget: Don't read PC in Update() if we don't have a CPU thread guard.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index 7b976e3cc1..218350e568 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -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;