Guard against NULL return from find_protocol_by_id().
svn path=/trunk/; revision=36393
This commit is contained in:
parent
f7c84ad094
commit
9e5a9badda
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue