From b1293d18ac02868a3e30fa81795f7970c47e39a9 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Sat, 19 Dec 2009 14:28:22 +0000 Subject: [PATCH] Fix crash in tilemap viewer when driver has no tilemaps (no whatsnew) --- src/emu/tilemap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c index 47fd2aa9c8a..3077069e2d6 100644 --- a/src/emu/tilemap.c +++ b/src/emu/tilemap.c @@ -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++;