From 96541d24167879bc23356fbd103e782d0b7e6e1a Mon Sep 17 00:00:00 2001 From: Clippy95 Date: Tue, 31 Dec 2024 14:38:24 +0300 Subject: [PATCH] SR1 Hotfix: Fix Freckle Bitch's crashing due to NULL rims_jobs_vehicle_pointer (#60) Co-authored-by: Clippy95 --- src/xenia/hid/winkey/hookables/SaintsRow1.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/hid/winkey/hookables/SaintsRow1.cc b/src/xenia/hid/winkey/hookables/SaintsRow1.cc index 8eb7685a72..ab55d9462d 100644 --- a/src/xenia/hid/winkey/hookables/SaintsRow1.cc +++ b/src/xenia/hid/winkey/hookables/SaintsRow1.cc @@ -388,7 +388,8 @@ bool SaintsRow1Game::RotatePlayerinCustomization(RawInputState& input_state) { max_zoom = 9.f; xe::be* rims_jobs_vehicle_pointer = multi_pointer( supported_builds[game_build_].rims_jobs_address_ptr, {0x20, 0x98}); - if (*rims_jobs_vehicle_pointer == NULL) return false; + if (!rims_jobs_vehicle_pointer || *rims_jobs_vehicle_pointer == NULL) + return false; player_x_sin = kernel_memory()->TranslateVirtual*>( *rims_jobs_vehicle_pointer + 0x40); player_x_cos = kernel_memory()->TranslateVirtual*>(