瀏覽代碼

debugger: safety check for pid list

- some event route blocks can be executed before all children
  initialization and the internal pid list structure is not created,
  disable debugging in this case
Daniel-Constantin Mierla 14 年之前
父節點
當前提交
35ef4b0d8f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/debugger/debugger_api.c

+ 1 - 1
modules/debugger/debugger_api.c

@@ -240,7 +240,7 @@ int dbg_cfg_trace(void *data)
 	a = (struct action *)srevp[0];
 	a = (struct action *)srevp[0];
 	msg = (struct sip_msg *)srevp[1];
 	msg = (struct sip_msg *)srevp[1];
 
 
-	if(a==NULL || msg==NULL)
+	if(a==NULL || msg==NULL || _dbg_pid_list==NULL)
 		return 0;
 		return 0;
 
 
 	an = dbg_get_action_name(a);
 	an = dbg_get_action_name(a);