index: fix segfault bug when trying to deleting an unresolved dep
parent
83840727f0
commit
6db3bbd790
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue