Browse Source

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 năm trước cách đây
mục cha
commit
35ef4b0d8f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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];
 	msg = (struct sip_msg *)srevp[1];
 
-	if(a==NULL || msg==NULL)
+	if(a==NULL || msg==NULL || _dbg_pid_list==NULL)
 		return 0;
 
 	an = dbg_get_action_name(a);