summaryrefslogtreecommitdiffstats
path: root/src/info.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-05 19:10:54 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-05 19:11:32 +0300
commit2cfca5b6ed658433419f9b581b3ba30f34c973c4 (patch)
treee9e184c8b2ce7e047783ca3180c29bac8f7f08a8 /src/info.c
parent8c81102268bb3154c1926c15ee4ac9707a7adbd3 (diff)
downloadapk-tools-2cfca5b6ed658433419f9b581b3ba30f34c973c4.tar.bz2
apk-tools-2cfca5b6ed658433419f9b581b3ba30f34c973c4.tar.xz
info: fix a --exists to work if the name is non-existant
Diffstat (limited to 'src/info.c')
-rw-r--r--src/info.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/info.c b/src/info.c
index a222b8c..073dc80 100644
--- a/src/info.c
+++ b/src/info.c
@@ -94,6 +94,9 @@ static int info_exists(struct info_ctx *ctx, struct apk_database *db,
continue;
name = dep.name;
+ if (name->pkgs == NULL)
+ continue;
+
for (j = 0; j < name->pkgs->num; j++) {
pkg = name->pkgs->item[j];
if (apk_pkg_get_state(pkg) == APK_PKG_INSTALLED)