]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix seg on user_recurse_variables reported on the mailing list
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 9 Aug 2011 13:33:03 +0000 (08:33 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 9 Aug 2011 13:33:07 +0000 (08:33 -0500)
src/mod/applications/mod_dptools/mod_dptools.c

index d62db97e13e73fc5b64cc4e822cff9988f6ba486..39e6380399f0e1def92e195d6412a69afb72e86a 100755 (executable)
@@ -3084,8 +3084,10 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
                }
        }
 
-       switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_user", user);
-       switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_domain", domain);
+       if (var_event) {
+               switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_user", user);
+               switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "dialed_domain", domain);
+       }
 
        if (!dest) {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No dial-string available, please check your user directory.\n");