isl_map.c: update_dim_opt: return early on error
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 30 Nov 2012 22:23:29 +0000 (23:23 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 1 Dec 2012 16:38:06 +0000 (17:38 +0100)
In particular, don't print any error messages based on the number
of elements in the list if the list doesn't exist.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c

index 1ec4121..b19be3c 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -6040,6 +6040,8 @@ static int update_dim_opt(__isl_take isl_basic_set *dom,
        isl_pw_aff **pwaff = user;
        isl_pw_aff *pwaff_i;
 
+       if (!list)
+               goto error;
        if (isl_aff_list_n_aff(list) != 1)
                isl_die(ctx, isl_error_internal,
                        "expecting single element list", goto error);