solver: check if solution is not found at all

This is an internal error.
cute-signatures
Timo Teräs 2013-01-18 17:11:44 +02:00
parent b960759daa
commit 2a194f3e7b
1 changed files with 6 additions and 0 deletions

View File

@ -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),