From 41899230fb747f2fedf51bb6821b0ad2b0aa6167 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Tue, 2 Oct 2018 10:25:15 +0200 Subject: [PATCH] Some games send TA data without calling ListInit first. Don't crash in that case. Fixes crashes in Looney Tunes Space Race, Test Drive Le Mans and others. --- core/hw/pvr/ta.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/hw/pvr/ta.cpp b/core/hw/pvr/ta.cpp index 97afd0506..6ad849af9 100644 --- a/core/hw/pvr/ta.cpp +++ b/core/hw/pvr/ta.cpp @@ -294,6 +294,12 @@ void ta_vtx_SoftReset() INLINE void DYNACALL ta_thd_data32_i(void* data) { + if (ta_ctx == NULL) + { + printf("Warning: data sent to TA prior to ListInit. Implied\n"); + ta_vtx_ListInit(); + } + simd256_t* dst = (simd256_t*)ta_tad.thd_data; simd256_t* src = (simd256_t*)data;