don't seg if strct is null

This commit is contained in:
Bill Currie 2002-05-17 19:34:40 +00:00
parent 2e8c18f8b6
commit d8c66aef76

View file

@ -96,7 +96,7 @@ new_struct_field (type_t *strct, type_t *type, const char *name,
struct_field_t *
struct_find_field (type_t *strct, const char *name)
{
if (!structs)
if (!structs || !strct)
return 0;
return Hash_Find (strct->struct_fields, name);
}