xbps_register_pkg: check for NULL pointer.

--HG--
extra : convert_revision : ccc656dc49c75e371d4de10bdcd0c07bf01090f2
This commit is contained in:
Juan RP 2009-02-12 18:59:14 +01:00
parent 28cfeea6d1
commit 97ceef46a8

View file

@ -249,7 +249,7 @@ xbps_register_pkg(prop_dictionary_t pkgrd, const char *pkgname,
goto out;
}
if (xbps_pkg_has_rundeps(pkgrd)) {
if (pkgrd && xbps_pkg_has_rundeps(pkgrd)) {
rv = xbps_update_pkg_requiredby(array, pkgrd);
if (rv != 0) {
prop_object_release(pkgd);