From a2e771212662960e72527958d64569c0d011c8ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 27 Jan 2024 13:24:30 +0100 Subject: [PATCH] Crashfix in JIT disassembly UI. Add sanity check in WaitUntil --- Core/FrameTiming.cpp | 2 +- UI/DevScreens.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/FrameTiming.cpp b/Core/FrameTiming.cpp index 10a29f044bae..3fb6e34003bc 100644 --- a/Core/FrameTiming.cpp +++ b/Core/FrameTiming.cpp @@ -39,7 +39,7 @@ void WaitUntil(double now, double timestamp) { } #else const double left = timestamp - now; - if (left > 0.0) { + if (left > 0.0 && left < 3.0) { usleep((long)(left * 1000000)); } #endif diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 28d6292cafcb..68963782ff99 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -1071,6 +1071,10 @@ void JitCompareScreen::UpdateDisasm() { using namespace UI; + if (!MIPSComp::jit) { + return; + } + JitBlockCacheDebugInterface *blockCacheDebug = MIPSComp::jit->GetBlockCacheDebugInterface(); char temp[256];