Add a null value check in CompositeHash::ComputeHash.

Because I guess aborting is nicer than segfaulting.

Addresses #930.
This commit is contained in:
Jon Siwek 2013-01-18 12:56:23 -06:00
parent fdd11428c1
commit 624980b98d

View file

@ -273,6 +273,9 @@ char* CompositeHash::SingleValHash(int type_check, char* kp0,
HashKey* CompositeHash::ComputeHash(const Val* v, int type_check) const
{
if ( ! v )
reporter->InternalError("null value given to CompositeHash::ComputeHash");
if ( is_singleton )
return ComputeSingletonHash(v, type_check);