From 65836742e80a7db883e75963e12f50b998552fff Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 4 Oct 2011 14:37:48 -0500 Subject: [PATCH] fix missing null dmachine check --- src/switch_core_session.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 3bccaf5b0a..99bf524324 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -43,7 +43,9 @@ SWITCH_DECLARE(void) switch_core_session_set_dmachine(switch_core_session_t *ses int i = (int) target; if (i == 0 || i == 1) { - switch_ivr_dmachine_set_target(dmachine, target); + if (dmachine) { + switch_ivr_dmachine_set_target(dmachine, target); + } session->dmachine[i] = dmachine; } }