Skip to content
Snippets Groups Projects
Commit 1a67a8e2 authored by Timo Teräs's avatar Timo Teräs
Browse files

state: world might be empty

so do not choke on it.
parent bb77b012
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,7 @@ struct apk_state *apk_state_new(struct apk_database *db)
/* Instantiate each 'name' target in world, and lockout incompatible
* choices */
for (i = 0; i < db->world->num; i++) {
for (i = 0; db->world != NULL && i < db->world->num; i++) {
r = apk_state_prune_dependency(state, &db->world->item[i]);
if (r < 0) {
apk_error("Top level dependencies for %s are "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment