diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-06-03 22:03:02 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-06-03 22:03:02 +0300 |
commit | 069c89898478b0273f7e6d0ea803d6151ee74ff7 (patch) | |
tree | d03cf8914c2bbb9caf711d14dd4d1e30e545df67 /src/state.c | |
parent | ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f (diff) | |
download | apk-tools-069c89898478b0273f7e6d0ea803d6151ee74ff7.tar.gz apk-tools-069c89898478b0273f7e6d0ea803d6151ee74ff7.tar.bz2 apk-tools-069c89898478b0273f7e6d0ea803d6151ee74ff7.tar.xz apk-tools-069c89898478b0273f7e6d0ea803d6151ee74ff7.zip |
state: fix a crash in error printing
Diffstat (limited to 'src/state.c')
-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 40ab359..141f466 100644 --- a/src/state.c +++ b/src/state.c @@ -838,7 +838,7 @@ void apk_state_print_errors(struct apk_state *state) es.prevpkg = pkg = state->conflicts->item[i]; es.indent.x = es.indent.indent = printf(" %s-%s:", pkg->name->name, pkg->version); - for (j = 0; j < pkg->depends->num; j++) { + for (j = 0; pkg->depends != NULL && j < pkg->depends->num; j++) { r = apk_state_lock_dependency(state, &pkg->depends->item[j]); if (r != 0) |