mirror of
https://github.com/holub/mame
synced 2025-04-30 11:50:30 +03:00
Fixed crash when reading ports by tag, when some ports don't have tags.
This commit is contained in:
parent
d2123b2803
commit
1c33c2f29b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user