From c8417bb09e7e817b48d38c68d491dba73b4629a2 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 9 Dec 2011 19:51:06 +0100 Subject: [PATCH] isl_map_from_pw_aff: handle NULL input Signed-off-by: Sven Verdoolaege --- isl_aff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_aff.c b/isl_aff.c index 9a6ce146..c1f55572 100644 --- a/isl_aff.c +++ b/isl_aff.c @@ -1411,6 +1411,8 @@ static __isl_give isl_map *map_from_pw_aff(__isl_take isl_pw_aff *pwaff) */ __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff) { + if (!pwaff) + return NULL; if (isl_space_is_set(pwaff->dim)) isl_die(isl_pw_aff_get_ctx(pwaff), isl_error_invalid, "space of input is not a map", -- 2.11.4.GIT