From 29b27b752cb5b3c7067a268fd757ba9c1cb91b87 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 21 Feb 2017 10:56:58 +0100 Subject: [PATCH] Fix compilation issue. --- coreapi/chat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/chat.c b/coreapi/chat.c index 646b2a311..9888c2519 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -649,7 +649,7 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const LinphoneChatRoom *cr = NULL; LinphoneAddress *addr; LinphoneAddress *to; - LinphoneChatMessage *msg; + LinphoneChatMessage *msg = NULL; LinphoneImEncryptionEngine *imee = lc->im_encryption_engine; const SalCustomHeader *ch; LinphoneReason reason = LinphoneReasonNone; @@ -737,7 +737,7 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const end: linphone_address_unref(addr); - linphone_chat_message_unref(msg); + if (msg != NULL) linphone_chat_message_unref(msg); return reason; }