Browse Source

modules_k/dialog Fixed a crash if a null parameter was given

Marius Zbihlei 14 years ago
parent
commit
9212b05c66
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules_k/dialog/dlg_var.c

+ 1 - 1
modules_k/dialog/dlg_var.c

@@ -92,7 +92,7 @@ int pv_set_dlg_ctx(struct sip_msg* msg, pv_param_t *param,
 			_dlg_ctx.to_bye = n;
 		break;
 		case 4:
-			if(val->flags&PV_VAL_STR) {
+			if(val && val->flags&PV_VAL_STR) {
 				if(val->rs.s[val->rs.len]=='\0'
 						&& val->rs.len<DLG_TOROUTE_SIZE) {
 					_dlg_ctx.to_route = route_lookup(&main_rt, val->rs.s);