From eeb42c0f115634047dd2af45fd36df0c6b056e68 Mon Sep 17 00:00:00 2001
From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Date: Thu, 25 Jan 2018 09:58:08 -0500
Subject: [PATCH] fix NPA in IMConversationManagerPrivate::newMessage()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

NPA causing crash when IMConversationManagerPrivate::newMessage()
is called with a non existing callId.

Change-Id: I5c1fd7e8e56b7bd3b2feb72281fddaf90442c649
Reviewed-by: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
---
 src/media/text.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/media/text.cpp b/src/media/text.cpp
index f3c940ff..2a38ccc8 100644
--- a/src/media/text.cpp
+++ b/src/media/text.cpp
@@ -143,7 +143,7 @@ void IMConversationManagerPrivate::newMessage(const QString& callId, const QStri
    Q_UNUSED(from)
 
    auto call = CallModel::instance().getCall(callId);
-   if (!call and !call->peerContactMethod()) {
+   if (!call or !call->peerContactMethod()) {
       return;
    }
 
-- 
GitLab