From df24305698acee9a40332317d70546cfa658de55 Mon Sep 17 00:00:00 2001 From: Eladash Date: Tue, 8 Aug 2023 09:48:12 +0300 Subject: [PATCH] PPU/Debugger: Fix op_branch_targets --- rpcs3/Emu/Cell/PPUThread.cpp | 4 +--- rpcs3/util/fixed_typemap.hpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 27067bb33b..eb9f967fce 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1206,9 +1206,7 @@ std::array op_branch_targets(u32 pc, ppu_opcode_t op) { std::array res{pc + 4, umax}; - g_fxo->need(); - - if (u32 target = g_fxo->get().get_target(pc)) + if (u32 target = g_fxo->is_init() ? g_fxo->get().get_target(pc) : 0) { res[0] = target; return res; diff --git a/rpcs3/util/fixed_typemap.hpp b/rpcs3/util/fixed_typemap.hpp index 896d8ae779..3c2ee8e7f2 100644 --- a/rpcs3/util/fixed_typemap.hpp +++ b/rpcs3/util/fixed_typemap.hpp @@ -347,7 +347,7 @@ namespace stx } // Check if object is not initialized but shall be initialized first (to use in initializing other objects) - template + template requires (std::is_constructible_v || std::is_default_constructible_v) void need() noexcept { if (!m_init[stx::typeindex>()])