Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
35ef4b0d8f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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);