isl_map_simple_hull: improve error handling
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 15 Jan 2012 14:21:17 +0000 (15:21 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 15 Jan 2012 16:17:51 +0000 (17:17 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_convex_hull.c

index a6e26b8..52c59d2 100644 (file)
@@ -2339,6 +2339,9 @@ struct isl_basic_map *isl_map_simple_hull(struct isl_map *map)
 
        hull = isl_basic_map_intersect(hull, affine_hull);
        hull = isl_basic_map_remove_redundancies(hull);
+
+       if (!hull)
+               return NULL;
        ISL_F_SET(hull, ISL_BASIC_MAP_NO_IMPLICIT);
        ISL_F_SET(hull, ISL_BASIC_MAP_ALL_EQUALITIES);