Fix crash when terminating a call.

This commit is contained in:
Ghislain MARY 2017-06-29 16:04:57 +02:00
parent a5301bd410
commit 5a29621141

View file

@ -159,9 +159,10 @@ void ChatProxyModel::setSipAddress (const QString &sipAddress) {
}
mChatModel = CoreManager::getInstance()->getChatModelFromSipAddress(sipAddress);
mChatModel->resetMessagesCount();
if (mChatModel) {
mChatModel->resetMessagesCount();
ChatModel *chatModel = mChatModel.get();
QObject::connect(chatModel, &ChatModel::isRemoteComposingChanged, this, &ChatProxyModel::handleIsRemoteComposingChanged);
QObject::connect(chatModel, &ChatModel::messageReceived, this, &ChatProxyModel::handleMessageReceived);