From b306adf52bec87ea760f7be0b53a6cca004fccfd Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 11 Sep 2014 18:10:04 +0200 Subject: [PATCH] bin/xbps-query/ownedby.c: take into account pkgs with no files. --- bin/xbps-query/ownedby.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xbps-query/ownedby.c b/bin/xbps-query/ownedby.c index 592640aa..aebf2228 100644 --- a/bin/xbps-query/ownedby.c +++ b/bin/xbps-query/ownedby.c @@ -102,9 +102,9 @@ ownedby_pkgdb_cb(struct xbps_handle *xhp, (void)done; xbps_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); - pkgmetad = xbps_pkgdb_get_pkg_files(xhp, pkgver); - assert(pkgmetad); + if (pkgmetad == NULL) + return 0; files_keys = xbps_dictionary_all_keys(pkgmetad); for (unsigned int i = 0; i < xbps_array_count(files_keys); i++) {