From cdc4acd98d063628b03a80b9bde7eff3ce53c2d7 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Mon, 10 Oct 2016 14:21:32 -0600 Subject: fixes null pointer for if --- lib/chillcg/src/CG_chillBuilder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chillcg/src/CG_chillBuilder.cc b/lib/chillcg/src/CG_chillBuilder.cc index 045320f..185372a 100755 --- a/lib/chillcg/src/CG_chillBuilder.cc +++ b/lib/chillcg/src/CG_chillBuilder.cc @@ -25,8 +25,8 @@ namespace omega { // substitute at chill AST level chillAST_Node *substituteChill( const char *oldvar, CG_chillRepr *newvar, chillAST_Node *n, chillAST_Node *parent = NULL ) { if (n == NULL) { - CG_ERROR(" pointer n == NULL\n"); - exit(-1); + CG_DEBUG_PRINT(" pointer n == NULL\n"); + return NULL; } chillAST_Node *r = n; -- cgit v1.2.3-70-g09d2