From 8f7ac1791c9a00dbbb20012eb03d6ba4b34bdd89 Mon Sep 17 00:00:00 2001 From: 1 <1> Date: Wed, 4 Oct 2017 19:07:18 +0100 Subject: [PATCH] Game-Fixes_HRL_Ext? --- src/core/hw/gpu.cpp | 4 ++++ src/video_core/command_processor.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 83ad9d898..09061ba49 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp @@ -263,6 +263,10 @@ static void DisplayTransfer(const Regs::DisplayTransferConfig& config) { } } + if (!dst_pointer) { + LOG_CRITICAL(HW_GPU, "Invalid address %08x", dst_pointer); + break; + } const u8* src_pixel = src_pointer + src_offset; src_color = DecodePixel(config.input_format, src_pixel); if (config.scaling == config.ScaleX) { diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index caf9f7a06..15f0cedf2 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -229,6 +229,10 @@ static void Draw(u32 command_id) { const auto& index_info = regs.pipeline.index_array; const u8* index_address_8 = Memory::GetPhysicalPointer(base_address + index_info.offset); + if (!index_address_8) { + LOG_CRITICAL(HW_GPU, "Invalid index_address_8 %08x", index_address_8); + return; + } const u16* index_address_16 = reinterpret_cast(index_address_8); bool index_u16 = index_info.format != 0;