Fixed crash when reading ports by tag, when some ports don't have tags.

This commit is contained in:
Aaron Giles 2008-05-18 14:21:28 +00:00
parent d2123b2803
commit 1c33c2f29b

View File

@ -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;