Handle null static requests.

GitOrigin-RevId: 4247e69ad556693fdc0084b244c4bb9804a8cc1a
This commit is contained in:
levlam 2019-03-09 18:30:25 +03:00
parent 2354a05602
commit 5707d5b277

View File

@ -3346,6 +3346,11 @@ void Td::request(uint64 id, tl_object_ptr<td_api::Function> function) {
}
td_api::object_ptr<td_api::Object> Td::static_request(td_api::object_ptr<td_api::Function> function) {
if (function == nullptr) {
LOG(ERROR) << "Receive empty static request";
return td_api::make_object<td_api::error>(400, "Request is empty");
}
bool need_logging = [&] {
switch (function->get_id()) {
case td_api::getTextEntities::ID: