isl_convex_hull.c: compute_facet: avoid NULL pointer dereference
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 25 Jun 2010 15:11:35 +0000 (17:11 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:38 +0000 (17:37 +0200)
isl_convex_hull.c

index 8465c4d..4a82e6a 100644 (file)
@@ -559,7 +559,8 @@ static struct isl_basic_set *compute_facet(struct isl_set *set, isl_int *c)
        set = isl_set_preimage(set, U);
        facet = uset_convex_hull_wrap_bounded(set);
        facet = isl_basic_set_preimage(facet, Q);
-       isl_assert(ctx, facet->n_eq == 0, goto error);
+       if (facet)
+               isl_assert(ctx, facet->n_eq == 0, goto error);
        return facet;
 error:
        isl_basic_set_free(facet);