Commit 069c8989 authored by Timo Teräs's avatar Timo Teräs

state: fix a crash in error printing

parent ce3cf8bf
......@@ -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)
......
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