From b446dc737084d77dbaaf9bec9c53243c1157aa5b Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Wed, 12 Feb 2020 10:23:32 +0000 Subject: [PATCH] [core] scan-build: Dereference of null pointer (loaded from variable 'result') - switch_ivr_play_and_detect_speech() --- src/switch_ivr_async.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 96e26f2cc0..5753721fa3 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -4624,7 +4624,9 @@ done: if (state.done) { status = SWITCH_STATUS_SUCCESS; } - *result = state.result; + if (result) { + *result = state.result; + } arg_recursion_check_stop(args);