diff --git a/src/switch_ivr.c b/src/switch_ivr.c index b8e09c85f6..e5406fe41c 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -450,7 +450,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se break; } - if (args->input_callback || args->buf || args->buflen) { + if (args && (args->input_callback || args->buf || args->buflen)) { /* dtmf handler function you can hook up to be executed when a digit is dialed during playback if you return anything but SWITCH_STATUS_SUCCESS the playback will stop. @@ -1161,7 +1161,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess switch_event_destroy(&event); } - if (args->input_callback || args->buf || args->buflen) { + if (args && (args->input_callback || args->buf || args->buflen)) { /* dtmf handler function you can hook up to be executed when a digit is dialed during playback if you return anything but SWITCH_STATUS_SUCCESS the playback will stop. @@ -1558,7 +1558,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session switch_event_destroy(&event); } - if (args->input_callback || args->buf || args->buflen) { + if (args && (args->input_callback || args->buf || args->buflen)) { /* dtmf handler function you can hook up to be executed when a digit is dialed during playback if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.