summaryrefslogtreecommitdiff
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)
downloadapk-tools-2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9.tar.gz
apk-tools-2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9.tar.bz2
apk-tools-2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9.tar.xz
apk-tools-2a194f3e7b6413533adcd3eb8f37d9256fc7d8d9.zip
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 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),