Commit 08d5cbbe authored by Simon Morlat's avatar Simon Morlat

fix big crash in linphone_core_get_or_create_chat_room()

parent 5cfb2710
......@@ -71,14 +71,19 @@ bool_t linphone_chat_room_matches(LinphoneChatRoom *cr, const LinphoneAddress *f
* @return #LinphoneChatRoom where messaging can take place.
LinphoneChatRoom* linphone_core_get_or_create_chat_room(LinphoneCore* lc, const char* to) {
MSList* found;
found = ms_list_find_custom(lc->chatrooms, (MSCompareFunc) linphone_chat_room_matches, to);
if (found != NULL) {
return (LinphoneChatRoom*)found->data;
} else {
return linphone_core_create_chat_room(lc, to);
LinphoneAddress *to_addr=linphone_core_interpret_url(lc,to);
LinphoneChatRoom *ret;
if (to_addr==NULL){
ms_error("linphone_core_get_or_create_chat_room(): Cannot make a valid address with %s",to);
return NULL;
if (!ret){
return ret;
......@@ -5797,7 +5797,7 @@ int linphone_core_del_call( LinphoneCore *lc, LinphoneCall *call)
* Specifiies a ring back tone to be played to far end during incoming calls.
* Specifies a ring back tone to be played to far end during incoming calls.
void linphone_core_set_remote_ringback_tone(LinphoneCore *lc, const char *file){
if (lc->sound_conf.ringback_tone){
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