summaryrefslogtreecommitdiff
path: root/isl_dim.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2010-11-11 14:31:47 +0100
committerSven Verdoolaege <skimo@kotnet.org>2010-11-12 10:36:29 +0100
commitfe01580ef0c253615840c549b00946b8ac1676ab (patch)
tree5117de723f2447a0317bdf870858f9e6d05075b3 /isl_dim.c
parent37d11ffeb7e18553e2c9182a8c4889fd1052a1ce (diff)
downloadisl-fe01580ef0c253615840c549b00946b8ac1676ab.tar.gz
isl-fe01580ef0c253615840c549b00946b8ac1676ab.tar.bz2
isl-fe01580ef0c253615840c549b00946b8ac1676ab.zip
isl_dim_total: handle NULL input
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Diffstat (limited to 'isl_dim.c')
-rw-r--r--isl_dim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/isl_dim.c b/isl_dim.c
index 1fb7c446..b692188d 100644
--- a/isl_dim.c
+++ b/isl_dim.c
@@ -957,7 +957,7 @@ struct isl_dim *isl_dim_underlying(struct isl_dim *dim, unsigned n_div)
unsigned isl_dim_total(struct isl_dim *dim)
{
- return dim->nparam + dim->n_in + dim->n_out;
+ return dim ? dim->nparam + dim->n_in + dim->n_out : 0;
}
int isl_dim_equal(struct isl_dim *dim1, struct isl_dim *dim2)