From 2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 18 Jan 2013 17:11:44 +0200 Subject: solver: check if solution is not found at all This is an internal error. --- src/solver.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/solver.c') diff --git a/src/solver.c b/src/solver.c index 29ee8ea..bf9a167 100644 --- a/src/solver.c +++ b/src/solver.c @@ -1580,6 +1580,12 @@ int apk_solver_solve(struct apk_database *db, foreach_dependency(ss, world, undo_constraint); #endif + + if (ss->best_solution == NULL) { + apk_error("Internal error: no solution at all found."); + return -1; + } + /* collect packages */ dbg_printf("finished. best score "SCORE_FMT". solution has %zu packages.\n", SCORE_PRINTF(&ss->best_score), -- cgit v1.2.3-60-g2f50