From d5a5432a8ba450169039d1b66f35b1461f608622 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 19 Apr 2020 16:03:31 +1000 Subject: [PATCH] CPU/CodeCache: Fix crash when BIOS is missing --- src/core/cpu_code_cache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index 4a0fca601..1a979d4ae 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -21,7 +21,8 @@ CodeCache::CodeCache() = default; CodeCache::~CodeCache() { - Flush(); + if (m_system) + Flush(); } void CodeCache::Initialize(System* system, Core* core, Bus* bus, bool use_recompiler)