Guard against NULL return from find_protocol_by_id().

svn path=/trunk/; revision=36393
This commit is contained in:
Stig Bjørlykke 2011-03-29 11:09:59 +00:00
parent f7c84ad094
commit 9e5a9badda
1 changed files with 3 additions and 0 deletions

View File

@ -4478,6 +4478,9 @@ proto_get_protocol_name(const int proto_id)
protocol_t *protocol;
protocol = find_protocol_by_id(proto_id);
if (protocol == NULL)
return NULL;
return protocol->name;
}