From a95253fc94f44dcf80222eae711df1147a0e740c Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 23 Sep 2014 12:47:51 +0200 Subject: [PATCH] Fix crash on wp8 --- coreapi/linphonecall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 2b3db0775..08c619ff1 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2642,10 +2642,10 @@ uint64_t linphone_call_stats_get_late_packets_cumulative_number(const LinphoneCa if (!stats || !call) return 0; memset(&rtp_stats, 0, sizeof(rtp_stats)); - if (stats->type == LINPHONE_CALL_STATS_AUDIO) + if (stats->type == LINPHONE_CALL_STATS_AUDIO && call->audiostream != NULL) audio_stream_get_local_rtp_stats(call->audiostream, &rtp_stats); #ifdef VIDEO_ENABLED - else + else if (call->videostream != NULL) video_stream_get_local_rtp_stats(call->videostream, &rtp_stats); #endif return rtp_stats.outoftime;