xbps_configure_pkg: add a safety check.
--HG-- extra : convert_revision : 4e3c7b7a52603baf0e447d1e32f9598df3b5b979
This commit is contained in:
parent
ed711fe8b9
commit
99384e1f5e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue