isl_basic_set_from_point: handle NULL input
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 27 Nov 2013 14:40:44 +0000 (27 15:40 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 4 Dec 2013 12:16:35 +0000 (4 13:16 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_point.c

index a86dd67..6629f65 100644 (file)
@@ -422,6 +422,9 @@ __isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt)
        isl_basic_set *bset;
        isl_basic_set *model;
 
+       if (!pnt)
+               return NULL;
+
        model = isl_basic_set_empty(isl_space_copy(pnt->dim));
        bset = isl_basic_set_from_vec(isl_vec_copy(pnt->vec));
        bset = isl_basic_set_from_underlying_set(bset, model);