isl_map.c: basic_map_space_reset: handle NULL input
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Dec 2012 11:20:44 +0000 (12:20 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Dec 2012 11:23:44 +0000 (12:23 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index a22fc94..7c9ac36 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -2993,6 +2993,8 @@ static __isl_give isl_basic_map *basic_map_space_reset(
 {
        isl_space *space;
 
+       if (!bmap)
+               return NULL;
        if (!isl_space_is_named_or_nested(bmap->dim, type))
                return bmap;