Fix crash in tilemap viewer when driver has no tilemaps (no whatsnew)

This commit is contained in:
Phil Bennett 2009-12-19 14:28:22 +00:00
parent 06c1f8edbf
commit b1293d18ac

View File

@ -980,6 +980,9 @@ int tilemap_count(running_machine *machine)
tilemap *tmap;
int count = 0;
if (machine->tilemap_data == NULL)
return 0;
/* find by the tilemap index */
for (tmap = machine->tilemap_data->list; tmap != NULL; tmap = tmap->next)
count++;