fix crash at termination

This commit is contained in:
Simon Morlat 2010-06-14 12:06:58 +02:00
parent a3a4fe17d8
commit 6cc2bfad9e
2 changed files with 8 additions and 3 deletions

View file

@ -285,5 +285,9 @@ MSSndCard *linphone_sound_daemon_get_proxy_card(LinphoneSoundDaemon *lsd){
}
void linphone_core_use_sound_daemon(LinphoneCore *lc, LinphoneSoundDaemon *lsd){
lc->sound_conf.lsd_card=linphone_sound_daemon_get_proxy_card (lsd);
if (lsd!=NULL){
lc->sound_conf.lsd_card=linphone_sound_daemon_get_proxy_card (lsd);
}else {
lc->sound_conf.lsd_card=NULL;
}
}

View file

@ -95,8 +95,9 @@ int main(int argc, char *argv[]){
wait_a_bit(lc,10);
linphone_core_terminate_call(lc,NULL);
}
linphone_core_destroy(lc);
linphone_core_use_sound_daemon(lc,NULL);
linphone_sound_daemon_destroy(lsd);
linphone_core_destroy(lc);
return 0;
}