Commit 6db3bbd7 authored by Natanael Copa's avatar Natanael Copa
Browse files

index: fix segfault bug when trying to deleting an unresolved dep

parent 83840727
...@@ -86,7 +86,7 @@ static int index_main(void *ctx, int argc, char **argv) ...@@ -86,7 +86,7 @@ static int index_main(void *ctx, int argc, char **argv)
if (ictx->delete) { if (ictx->delete) {
struct apk_name *name; struct apk_name *name;
name = apk_db_query_name(&db, APK_BLOB_STR(argv[i])); name = apk_db_query_name(&db, APK_BLOB_STR(argv[i]));
if (name == NULL) if (name == NULL || name->pkgs == NULL)
continue; continue;
/* apk_db_index_write() will only print the pkgs /* apk_db_index_write() will only print the pkgs
where repos == 0. We prevent to write the given where repos == 0. We prevent to write the given
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment