Do not dereference NULL pointer. refobj is NULL for the objects that are

preloaded.

Reported and tested by:	ed
This commit is contained in:
Konstantin Belousov 2009-03-28 15:54:08 +00:00
parent 24cd37102c
commit 4d59cc85e8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190505

View File

@ -1125,7 +1125,7 @@ find_library(const char *xname, const Obj_Entry *refobj)
xname);
return NULL;
}
if (refobj->z_origin)
if (refobj != NULL && refobj->z_origin)
return origin_subst(xname, refobj->origin_path);
else
return xstrdup(xname);