isl_basic_map_remove_divs: handle NULL input
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Aug 2011 13:24:23 +0000 (15:24 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Aug 2011 13:24:23 +0000 (15:24 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index 19d6f5c..4e41529 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -1390,6 +1390,8 @@ __isl_give isl_set *isl_set_eliminate_dims(__isl_take isl_set *set,
 __isl_give isl_basic_map *isl_basic_map_remove_divs(
        __isl_take isl_basic_map *bmap)
 {
+       if (!bmap)
+               return NULL;
        bmap = isl_basic_map_eliminate_vars(bmap, isl_dim_total(bmap->dim),
                                                bmap->n_div);
        if (!bmap)