isl_dim.c: copy_names: check input dim
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 25 Jun 2010 15:05:45 +0000 (17:05 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:38 +0000 (17:37 +0200)
isl_dim.c

index dae4149..a08f316 100644 (file)
--- a/isl_dim.c
+++ b/isl_dim.c
@@ -177,6 +177,9 @@ static struct isl_dim *copy_names(struct isl_dim *dst,
        int i;
        struct isl_name *name;
 
+       if (!dst)
+               return NULL;
+
        for (i = 0; i < n(src, src_type); ++i) {
                name = get_name(src, src_type, i);
                if (!name)