From 9757b956f1453bfa6f583b4cae87aedb25d4a742 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 7 Mar 2008 10:22:42 +0100 Subject: [PATCH] bernstein.cc: handle input with unions + relation violated in the whole union --- bernstein.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bernstein.cc b/bernstein.cc index ee43007..2dde808 100644 --- a/bernstein.cc +++ b/bernstein.cc @@ -611,10 +611,12 @@ piecewise_lst *bernstein_coefficients_relation(piecewise_lst *pl_all, { if (value_zero_p(EP->d) && EP->x.p->type == relation) { Polyhedron *E = relation_domain(D, &EP->x.p->arr[0], options->MaxRays); - pl_all = bernstein_coefficients_relation(pl_all, E, &EP->x.p->arr[1], - ctx, allvars, vars, params, - options); - Domain_Free(E); + if (E) { + pl_all = bernstein_coefficients_relation(pl_all, E, &EP->x.p->arr[1], + ctx, allvars, vars, params, + options); + Domain_Free(E); + } /* In principle, we could cut off the edges of this domain too */ if (EP->x.p->size > 2) pl_all = bernstein_coefficients_relation(pl_all, D, &EP->x.p->arr[2], -- 2.11.4.GIT