From e4958f0315bb82a4c5efba5bd02bb69c77a04c22 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 15 Feb 2006 09:34:55 +0100 Subject: [PATCH] barvinok_series: return empty gen_fun for empty polytope. --- barvinok.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/barvinok.cc b/barvinok.cc index 83ee542..e99f5d2 100644 --- a/barvinok.cc +++ b/barvinok.cc @@ -5632,6 +5632,11 @@ gen_fun * barvinok_series(Polyhedron *P, Polyhedron* C, unsigned MaxRays) P = DomainIntersection(P, CA, MaxRays); Polyhedron_Free(CA); + if (emptyQ2(P)) { + Polyhedron_Free(P); + return new gen_fun; + } + assert(!Polyhedron_is_infinite(P, nparam)); assert(P->NbBid == 0); assert(Polyhedron_has_positive_rays(P, nparam)); -- 2.11.4.GIT