isl_basic_map_simplify: avoid infinite loop on empty input
[platform/upstream/isl.git] / isl_tab.c
index a5e55b0..3fc0367 100644 (file)
--- a/isl_tab.c
+++ b/isl_tab.c
@@ -1,7 +1,7 @@
 /*
  * Copyright 2008-2009 Katholieke Universiteit Leuven
  *
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
  *
  * Written by Sven Verdoolaege, K.U.Leuven, Departement
  * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
@@ -787,6 +787,8 @@ static int push_union(struct isl_tab *tab,
 {
        struct isl_tab_undo *undo;
 
+       if (!tab)
+               return -1;
        if (!tab->need_undo)
                return 0;