summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index e906ab4..7bf11ae 100644
--- a/src/index.c
+++ b/src/index.c
@@ -86,7 +86,7 @@ static int index_main(void *ctx, int argc, char **argv)
if (ictx->delete) {
struct apk_name *name;
name = apk_db_query_name(&db, APK_BLOB_STR(argv[i]));
- if (name == NULL)
+ if (name == NULL || name->pkgs == NULL)
continue;
/* apk_db_index_write() will only print the pkgs
where repos == 0. We prevent to write the given