From 9e726edec7035480c65e1bda1b2639a961cb89e4 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 12 May 2010 11:30:46 +0200 Subject: [PATCH] isl_qpolynomial_opt_on_domain: handle empty input --- isl_polynomial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isl_polynomial.c b/isl_polynomial.c index 28b9f7e0..72692240 100644 --- a/isl_polynomial.c +++ b/isl_polynomial.c @@ -2987,6 +2987,9 @@ __isl_give isl_qpolynomial *isl_qpolynomial_opt_on_domain( if (isl_set_foreach_point(set, opt_fn, &data) < 0) goto error; + if (data.first) + data.opt = isl_qpolynomial_zero(isl_qpolynomial_get_dim(qp)); + isl_set_free(set); isl_qpolynomial_free(qp); return data.opt; -- 2.11.4.GIT