From 1c33c2f29b844e7fdd44965fc3b21f7f7bd91eb9 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sun, 18 May 2008 14:21:28 +0000 Subject: [PATCH] Fixed crash when reading ports by tag, when some ports don't have tags. --- src/emu/inptport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/inptport.c b/src/emu/inptport.c index ce2e2ac345f..36886bced59 100644 --- a/src/emu/inptport.c +++ b/src/emu/inptport.c @@ -699,7 +699,7 @@ const input_port_config *input_port_by_tag(const input_port_config *portlist, co /* loop over ports until we hit the index or run out */ for (port = portlist; port != NULL; port = port->next) - if (strcmp(port->tag, tag) == 0) + if (port->tag != NULL && strcmp(port->tag, tag) == 0) return port; return NULL;