From b65516c163831c43a5e7a73184a6fbc036e7931e Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 22 Oct 2015 16:14:01 +0200 Subject: [PATCH] fix crash when no audio stream exists. --- coreapi/linphonecall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index f4ec3ac8e..38df23d59 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -4053,7 +4053,7 @@ static void report_bandwidth(LinphoneCall *call, MediaStream *as, MediaStream *v call->stats[LINPHONE_CALL_STATS_AUDIO].updated|=LINPHONE_CALL_STATS_PERIODICAL_UPDATE; linphone_core_notify_call_stats_updated(call->core, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]); call->stats[LINPHONE_CALL_STATS_AUDIO].updated=0; - update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO], as); + if (as) update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO], as); call->stats[LINPHONE_CALL_STATS_VIDEO].updated|=LINPHONE_CALL_STATS_PERIODICAL_UPDATE; linphone_core_notify_call_stats_updated(call->core, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);