xbps_configure_pkg: add a safety check.

--HG--
extra : convert_revision : 4e3c7b7a52603baf0e447d1e32f9598df3b5b979
This commit is contained in:
Juan RP 2009-08-13 17:30:39 +02:00
parent ed711fe8b9
commit 99384e1f5e
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ xbps_configure_pkg(const char *pkgname)
return EINVAL;
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
if (pkgd == NULL)
return ENOENT;
prop_dictionary_get_cstring_nocopy(pkgd, "version", &version);
prop_object_release(pkgd);