bernstein_coefficients_cell: handle NULL poly
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 30 Aug 2011 12:14:15 +0000 (14:14 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 31 Aug 2011 17:33:56 +0000 (19:33 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_bernstein.c

index 1458e27..7358b71 100644 (file)
@@ -255,6 +255,9 @@ static int bernstein_coefficients_cell(__isl_take isl_cell *cell, void *user)
        isl_set *dom;
        isl_ctx *ctx;
 
+       if (!poly)
+               goto error;
+
        nvar = isl_qpolynomial_dim(poly, isl_dim_set) - 1;
        n_vertices = cell->n_vertices;