From 6e9e1bbed85a35a308f476799f99228325bfee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Tue, 10 May 2016 16:24:06 +0200 Subject: [PATCH] Fixes possible crash in "Call with in-dialog very early call request" test --- tester/call_tester.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tester/call_tester.c b/tester/call_tester.c index eb0cc2678..4827fe046 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -4288,10 +4288,12 @@ static void call_with_very_early_call_update(void) { BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,1)); } + if(linphone_core_get_current_call(pauline->lc)) { + params=linphone_core_create_call_params(pauline->lc,linphone_core_get_current_call(pauline->lc)); + linphone_core_update_call(pauline->lc,linphone_core_get_current_call(pauline->lc),params); + linphone_call_params_destroy(params); + } - params=linphone_core_create_call_params(pauline->lc,linphone_core_get_current_call(pauline->lc)); - linphone_core_update_call(pauline->lc,linphone_core_get_current_call(pauline->lc),params); - linphone_call_params_destroy(params); BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallUpdating,1)); BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdatedByRemote,1)); BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,2));