mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 02:39:22 +00:00
Add check to prevent crashes when using a wrapper about liblinphone.
If a wrapper holds a reference to a linphone call and the core is destroyed, the call can keep a reference to a core that no longer exists. This can cause some random crashes.
This commit is contained in:
parent
9593470550
commit
6935d6cf36
1 changed files with 7 additions and 4 deletions
|
|
@ -2086,12 +2086,15 @@ void linphone_call_stop_video_stream(LinphoneCall *call) {
|
|||
}
|
||||
|
||||
void linphone_call_stop_media_streams(LinphoneCall *call){
|
||||
linphone_call_stop_audio_stream(call);
|
||||
linphone_call_stop_video_stream(call);
|
||||
if (call->audiostream || call->videostream) {
|
||||
linphone_call_stop_audio_stream(call);
|
||||
linphone_call_stop_video_stream(call);
|
||||
|
||||
if (call->core->msevq != NULL) {
|
||||
ms_event_queue_skip(call->core->msevq);
|
||||
if (call->core->msevq != NULL) {
|
||||
ms_event_queue_skip(call->core->msevq);
|
||||
}
|
||||
}
|
||||
|
||||
if (call->audio_profile){
|
||||
rtp_profile_destroy(call->audio_profile);
|
||||
call->audio_profile=NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue