isl_set_from_pw_multi_aff: handle NULL input
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 17 Sep 2012 11:47:48 +0000 (13:47 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 17 Sep 2012 12:02:16 +0000 (14:02 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_aff.c

index 675801f..4d6a314 100644 (file)
--- a/isl_aff.c
+++ b/isl_aff.c
@@ -3092,6 +3092,9 @@ __isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma)
 
 __isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma)
 {
+       if (!pma)
+               return NULL;
+
        if (!isl_space_is_set(pma->dim))
                isl_die(isl_pw_multi_aff_get_ctx(pma), isl_error_invalid,
                        "isl_pw_multi_aff cannot be converted into an isl_set",