diff --git a/td/telegram/CallActor.cpp b/td/telegram/CallActor.cpp index 7334110d6..ae6ee98d7 100644 --- a/td/telegram/CallActor.cpp +++ b/td/telegram/CallActor.cpp @@ -291,6 +291,7 @@ Status CallActor::do_update_call(telegram_api::phoneCallRequested &call) { LOG(DEBUG) << "Do update call to Requested"; call_id_ = call.id_; call_access_hash_ = call.access_hash_; + is_call_id_inited_ = true; call_admin_id_ = call.admin_id_; call_participant_id_ = call.participant_id_; if (call_id_promise_) { @@ -310,7 +311,7 @@ Status CallActor::do_update_call(telegram_api::phoneCallRequested &call) { } tl_object_ptr CallActor::get_input_phone_call() { - CHECK(call_id_ != 0); + CHECK(is_call_id_inited_); return make_tl_object(call_id_, call_access_hash_); } diff --git a/td/telegram/CallActor.h b/td/telegram/CallActor.h index b516c92a3..17014fdc1 100644 --- a/td/telegram/CallActor.h +++ b/td/telegram/CallActor.h @@ -118,6 +118,7 @@ class CallActor : public NetQueryCallback { CallId local_call_id_; int64 call_id_{0}; + bool is_call_id_inited_{false}; int64 call_access_hash_{0}; int32 call_admin_id_{0}; int32 call_participant_id_{0};