diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index fed7fb9805..817407178b 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -901,12 +901,14 @@ SWITCH_STANDARD_APP(event_function) for (x = 0; x < argc; x++) { char *p, *this = argv[x]; - p = this; - while(*p == ' ') *p++ = '\0'; - this = p; - if (this) { - char *var = this, *val = NULL; + char *var, *val; + p = this; + while(*p == ' ') *p++ = '\0'; + this = p; + + var = this; + val = NULL; if ((val = strchr(var, '='))) { p = val - 1; *val++ = '\0';