isl_union_pw_qpolynomial_zero: check for NULL input
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 11 Oct 2010 11:14:12 +0000 (13:14 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 11 Oct 2010 11:14:12 +0000 (13:14 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_union_templ.c

index c8ae4c1..a04759f 100644 (file)
@@ -46,6 +46,9 @@ static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_dim *dim, int size)
 {
        UNION *u;
 
+       if (!dim)
+               return NULL;
+
        u = isl_calloc_type(ctx, UNION);
        if (!u)
                return NULL;