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.
This commit is contained in:
Flyinghead 2018-10-02 10:25:15 +02:00
parent 4b24d22385
commit 41899230fb
1 changed files with 6 additions and 0 deletions

View File

@ -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;