isl_polytope_scan: improve error handling
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 1 Sep 2010 14:35:56 +0000 (16:35 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 4 Sep 2010 09:02:36 +0000 (11:02 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
polytope_scan.c

index 41983aa..fbd80ae 100644 (file)
@@ -72,6 +72,9 @@ static struct isl_mat *isl_basic_set_samples(struct isl_basic_set *bset)
        struct isl_mat *T;
        struct isl_mat *samples;
 
+       if (!bset)
+               return NULL;
+
        if (bset->n_eq == 0)
                return isl_basic_set_scan_samples(bset);