diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-08-05 12:28:00 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-08-05 12:28:00 +0300 |
commit | 1a67a8e2b6a9a1f23b38c6dc5329dae2f9c0cbbe (patch) | |
tree | 49db4559032a62ebbaeb944d5965be1131cd966e /src | |
parent | bb77b01244d42ef669212fc1d3cf11590135fc12 (diff) | |
download | apk-tools-1a67a8e2b6a9a1f23b38c6dc5329dae2f9c0cbbe.tar.gz apk-tools-1a67a8e2b6a9a1f23b38c6dc5329dae2f9c0cbbe.tar.bz2 apk-tools-1a67a8e2b6a9a1f23b38c6dc5329dae2f9c0cbbe.tar.xz apk-tools-1a67a8e2b6a9a1f23b38c6dc5329dae2f9c0cbbe.zip |
state: world might be empty
so do not choke on it.
Diffstat (limited to 'src')
-rw-r--r-- | src/state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c index c723460..50c1ce3 100644 --- a/src/state.c +++ b/src/state.c @@ -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 " |