Commit 92600fc6 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add check to prevent crash.

parent c6d9b71c
...@@ -694,8 +694,12 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription * ...@@ -694,8 +694,12 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription *
if (session_state == IS_Completed) { if (session_state == IS_Completed) {
desc->ice_completed = TRUE; desc->ice_completed = TRUE;
ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL); result = ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL);
strncpy(desc->addr, rtp_addr, sizeof(desc->addr)); if (result == TRUE) {
strncpy(desc->addr, rtp_addr, sizeof(desc->addr));
} else {
ms_warning("If ICE has completed successfully, rtp_addr should be set!");
}
} }
else { else {
desc->ice_completed = FALSE; desc->ice_completed = FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment