From 2fae089001155cb605589a21068965069048a5ec Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 21 Apr 2015 13:35:57 +0200 Subject: [PATCH] isl_basic_map_plain_cmp: handle NULL arguments Signed-off-by: Sven Verdoolaege --- isl_map.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isl_map.c b/isl_map.c index 0cf30483..458bb1ee 100644 --- a/isl_map.c +++ b/isl_map.c @@ -9031,6 +9031,9 @@ int isl_basic_map_plain_cmp(const __isl_keep isl_basic_map *bmap1, int i, cmp; unsigned total; + if (!bmap1 || !bmap2) + return -1; + if (bmap1 == bmap2) return 0; if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) != -- 2.11.4.GIT