]> sjero.net Git - linphone/commitdiff
Fix to prevent crashes.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Fri, 5 Oct 2012 09:27:48 +0000 (11:27 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Fri, 5 Oct 2012 09:31:54 +0000 (11:31 +0200)
coreapi/misc.c

index 7367fc517fa8c789c39e2a53f678017c5e849918..ebb19b08383bf65e8c2c65287e4c49906ca23338 100644 (file)
@@ -787,8 +787,7 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription *
                if ((ice_check_list_state(cl) == ICL_Completed) && (ice_session_role(session) == IR_Controlling)) {
                        int rtp_port, rtcp_port;
                        memset(stream->ice_remote_candidates, 0, sizeof(stream->ice_remote_candidates));
-                       ice_check_list_selected_valid_remote_candidate(cl, &rtp_addr, &rtp_port, &rtcp_addr, &rtcp_port);
-                       if ((rtp_addr != NULL) && (rtcp_addr != NULL)) {
+                       if (ice_check_list_selected_valid_remote_candidate(cl, &rtp_addr, &rtp_port, &rtcp_addr, &rtcp_port) == TRUE) {
                                strncpy(stream->ice_remote_candidates[0].addr, rtp_addr, sizeof(stream->ice_remote_candidates[0].addr));
                                stream->ice_remote_candidates[0].port = rtp_port;
                                strncpy(stream->ice_remote_candidates[1].addr, rtcp_addr, sizeof(stream->ice_remote_candidates[1].addr));