From 6db3bbd790954ce2db241fd68f4b10e34c442893 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 14 May 2009 07:18:11 +0000 Subject: index: fix segfault bug when trying to deleting an unresolved dep --- src/index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2