From a3fa2781de41c7bdebaa715c824349a6876f27d4 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 25 Feb 2012 19:17:03 +0000 Subject: [PATCH] Fatal error if a custom I/O port handler's device is not found. --- src/emu/ioport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emu/ioport.c b/src/emu/ioport.c index 680e69a25d6..8e991760a75 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -2004,6 +2004,8 @@ static void init_port_state(running_machine &machine) { *readdevicetail = init_field_device_info(field, port->owner().subtag(devicetag, field->read_device)); field->read.late_bind(*(*readdevicetail)->device); + if (!field->read.has_object()) + fatalerror("Input port %s, unable to find valid device with tag '%s'", port->tag(), devicetag.cstr()); readdevicetail = &(*readdevicetail)->next; } @@ -2012,6 +2014,8 @@ static void init_port_state(running_machine &machine) { *writedevicetail = init_field_device_info(field, port->owner().subtag(devicetag, field->write_device)); field->write.late_bind(*(*writedevicetail)->device); + if (!field->write.has_object()) + fatalerror("Input port %s, unable to find valid device with tag '%s'", port->tag(), devicetag.cstr()); writedevicetail = &(*writedevicetail)->next; }