From: Anthony Minessale Date: Tue, 4 Oct 2011 19:14:40 +0000 (-0500) Subject: fix missing null dmachine check X-Git-Tag: v1.2-rc1~27^2~379 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0b5fb16dcf86d5e0de9b9926eb8c69f3d0ea1bc;p=thirdparty%2Ffreeswitch.git fix missing null dmachine check --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index c36d5e648c..4a78322a60 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -78,11 +78,13 @@ struct switch_ivr_dmachine { SWITCH_DECLARE(switch_digit_action_target_t) switch_ivr_dmachine_get_target(switch_ivr_dmachine_t *dmachine) { + switch_assert(dmachine); return dmachine->target; } SWITCH_DECLARE(void) switch_ivr_dmachine_set_target(switch_ivr_dmachine_t *dmachine, switch_digit_action_target_t target) { + switch_assert(dmachine); dmachine->target = target; } @@ -90,6 +92,7 @@ SWITCH_DECLARE(void) switch_ivr_dmachine_set_target(switch_ivr_dmachine_t *dmach SWITCH_DECLARE(void) switch_ivr_dmachine_set_match_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t match_callback) { + switch_assert(dmachine); dmachine->match_callback = match_callback; } @@ -97,6 +100,7 @@ SWITCH_DECLARE(void) switch_ivr_dmachine_set_match_callback(switch_ivr_dmachine_ SWITCH_DECLARE(void) switch_ivr_dmachine_set_nonmatch_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t nonmatch_callback) { + switch_assert(dmachine); dmachine->nonmatch_callback = nonmatch_callback; }