浏览代码

core: safety check accessing variables in dbg message during fixup operation

Daniel-Constantin Mierla 11 年之前
父节点
当前提交
0bda1dc823
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      switch.c

+ 2 - 2
switch.c

@@ -538,8 +538,8 @@ static int fix_match(struct action* t)
 			if (default_found){
 				LOG(L_ERR, "ERROR: fix_match: more then one \"default\""
 						" label found (%d, %d)\n",
-						c->ct_rve->fpos.s_line,
-						c->ct_rve->fpos.s_col);
+						(c->ct_rve)?c->ct_rve->fpos.s_line:0,
+						(c->ct_rve)?c->ct_rve->fpos.s_col:0);
 				ret=E_UNSPEC;
 				goto error;
 			}