aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-01-18 17:11:44 +0200
committerTimo Teräs <timo.teras@iki.fi>2013-01-21 09:12:44 +0200
commit2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9 (patch)
tree4f6e36c01e1e3fc54fa179bb7534474bc534cc26 /src
parentb960759daa5cdc6e7fa04126bc501480fefbdf86 (diff)
downloadaports-2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9.tar.bz2
aports-2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9.tar.xz
solver: check if solution is not found at all
This is an internal error.
Diffstat (limited to 'src')
-rw-r--r--src/solver.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/solver.c b/src/solver.c
index 29ee8ea6ff..bf9a167e9e 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),