mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 03:58:08 +00:00
Prevent crash if chatroom linphonecore is null
This commit is contained in:
parent
6759a59925
commit
54a47a2bd7
1 changed files with 3 additions and 3 deletions
|
|
@ -341,7 +341,7 @@ LinphoneChatRoom * linphone_core_get_chat_room_from_uri(LinphoneCore *lc, const
|
|||
|
||||
static void linphone_chat_room_delete_composing_idle_timer(LinphoneChatRoom *cr) {
|
||||
if (cr->composing_idle_timer) {
|
||||
if(cr->lc->sal)
|
||||
if(cr-> lc && cr->lc->sal)
|
||||
sal_cancel_timer(cr->lc->sal, cr->composing_idle_timer);
|
||||
belle_sip_object_unref(cr->composing_idle_timer);
|
||||
cr->composing_idle_timer = NULL;
|
||||
|
|
@ -350,7 +350,7 @@ static void linphone_chat_room_delete_composing_idle_timer(LinphoneChatRoom *cr)
|
|||
|
||||
static void linphone_chat_room_delete_composing_refresh_timer(LinphoneChatRoom *cr) {
|
||||
if (cr->composing_refresh_timer) {
|
||||
if(cr->lc->sal)
|
||||
if(cr->lc && cr->lc->sal)
|
||||
sal_cancel_timer(cr->lc->sal, cr->composing_refresh_timer);
|
||||
belle_sip_object_unref(cr->composing_refresh_timer);
|
||||
cr->composing_refresh_timer = NULL;
|
||||
|
|
@ -359,7 +359,7 @@ static void linphone_chat_room_delete_composing_refresh_timer(LinphoneChatRoom *
|
|||
|
||||
static void linphone_chat_room_delete_remote_composing_refresh_timer(LinphoneChatRoom *cr) {
|
||||
if (cr->remote_composing_refresh_timer) {
|
||||
if(cr->lc->sal)
|
||||
if(cr->lc && cr->lc->sal)
|
||||
sal_cancel_timer(cr->lc->sal, cr->remote_composing_refresh_timer);
|
||||
belle_sip_object_unref(cr->remote_composing_refresh_timer);
|
||||
cr->remote_composing_refresh_timer = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue