Fix null entry

This commit is contained in:
mahoneyt944 2024-09-04 11:26:59 -04:00 committed by GitHub
parent 9b359c8a21
commit 6135089740
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -852,8 +852,16 @@ static struct tilemap *find_cache_entry(int page, int bank)
static void get_tile_info(int tile_index)
{
struct cache_entry *entry = tile_info.user_data;
UINT16 data = system32_videoram[((entry->page & 0x7f) << 9) | tile_index];
SET_TILE_INFO(0, (entry->bank << 13) | (data & 0x1fff), (data >> 4) & 0x1ff, (data >> 14) & 3);
UINT16 data;
if (!entry)
{
SET_TILE_INFO(0, 0, 0, 0)
return;
}
data = system32_videoram[((entry->page & 0x7f) << 9) | tile_index];
SET_TILE_INFO(0, (entry->bank << 13) | (data & 0x1fff), (data >> 4) & 0x1ff, (data >> 14) & 3)
}