Skip to content
Snippets Groups Projects
Commit 4eb36a24 authored by Nicolas Jager's avatar Nicolas Jager Committed by Sébastien Blin
Browse files

fix : crash when sending message outside a call


- bug : sending a message outside a call lead to throw a
  std::out_of_range.

- fix : correct the condition by replacing a 'or' by 'and'

Change-Id: Ieab9a3b3a1e6c411545c13d865b6e83faa727c3a
Reviewed-by: default avatarSébastien Blin <sebastien.blin@savoirfairelinux.com>
parent 8e2d826a
Branches
Tags
No related merge requests found
...@@ -458,8 +458,8 @@ ConversationModel::sendMessage(const std::string& uid, const std::string& body) ...@@ -458,8 +458,8 @@ ConversationModel::sendMessage(const std::string& uid, const std::string& body)
conversation.callId.clear(); conversation.callId.clear();
if (not conversation.callId.empty() if (not conversation.callId.empty()
or owner.callModel->getCall(conversation.callId).status != call::Status::IN_PROGRESS and (owner.callModel->getCall(conversation.callId).status != call::Status::IN_PROGRESS
or owner.callModel->getCall(conversation.callId).status != call::Status::PAUSED) { or owner.callModel->getCall(conversation.callId).status != call::Status::PAUSED)) {
owner.callModel->sendSipMessage(conversation.callId, body); owner.callModel->sendSipMessage(conversation.callId, body);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment