From dce9bf0cdab09cf62bde268246578e2df512b56c Mon Sep 17 00:00:00 2001 From: Benjamin Poirier Date: Thu, 18 Feb 2010 14:42:55 -0500 Subject: [PATCH] Don't add "0" rows to a glpk problem glpk aborts if "0" rows are added, skip over the call. Signed-off-by: Benjamin Poirier --- lttv/lttv/sync/event_analysis_eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lttv/lttv/sync/event_analysis_eval.c b/lttv/lttv/sync/event_analysis_eval.c index 6b961020..39aa7cda 100644 --- a/lttv/lttv/sync/event_analysis_eval.c +++ b/lttv/lttv/sync/event_analysis_eval.c @@ -1537,7 +1537,10 @@ static glp_prob* lpCreateProblem(GQueue* const lowerHull, GQueue* const // Create the LP problem glp_term_out(GLP_OFF); - glp_add_rows(lp, hullPointNb); + if (hullPointNb > 0) + { + glp_add_rows(lp, hullPointNb); + } glp_add_cols(lp, 2); glp_set_col_name(lp, 1, "a0"); -- 2.34.1