]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix missing null dmachine check
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 4 Oct 2011 19:37:48 +0000 (14:37 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 4 Oct 2011 19:37:48 +0000 (14:37 -0500)
src/switch_core_session.c

index 3bccaf5b0ad563be0a6a8a425d080489527e2010..99bf524324252083f2c40653d9af0fb4786385c1 100644 (file)
@@ -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;
        }
 }