From 22b47925d48670d5a7fccd2e7d909668caf4854e Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 25 Dec 2018 12:21:00 +0400 Subject: [PATCH] Fix assertion violation in calls. --- Telegram/SourceFiles/calls/calls_call.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index c93a41894f..a41b09f772 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -174,7 +174,8 @@ void Call::start(bytes::const_span random) { } else { startIncoming(); } - } else if (_state == State::ExchangingKeys && _answerAfterDhConfigReceived) { + } else if (_state == State::ExchangingKeys + && _answerAfterDhConfigReceived) { answer(); } } @@ -409,7 +410,9 @@ bool Call::handleUpdate(const MTPPhoneCall &call) { if (data.vid.v != _id) { return false; } - if (_type == Type::Incoming && _state == State::ExchangingKeys) { + if (_type == Type::Incoming + && _state == State::ExchangingKeys + && !_controller) { startConfirmedCall(data); } } return true;