isl_map_simplify.c: remove_dependent_vars: handle NULL input
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Dec 2012 14:33:42 +0000 (2 15:33 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Dec 2012 14:33:42 +0000 (2 15:33 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map_simplify.c

index 5042034..c3bbbc4 100644 (file)
@@ -1416,6 +1416,9 @@ static struct isl_basic_map *remove_dependent_vars(struct isl_basic_map *bmap,
 {
        int i;
 
+       if (!bmap)
+               return NULL;
+
        for (i = 0; i < bmap->n_div; ++i) {
                if (isl_int_is_zero(bmap->div[i][0]))
                        continue;