diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 93609258..bd8b1ab7 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -4579,6 +4579,11 @@ Status Td::fix_parameters(TdParameters ¶meters) { Status Td::set_parameters(td_api::object_ptr parameters) { VLOG(td_init) << "Begin to set TDLib parameters"; + if (parameters == nullptr) { + VLOG(td_init) << "Empty parameters"; + return Status::Error(400, "Parameters aren't specified"); + } + if (!clean_input_string(parameters->api_hash_) && !clean_input_string(parameters->system_language_code_) && !clean_input_string(parameters->device_model_) && !clean_input_string(parameters->system_version_) && !clean_input_string(parameters->application_version_)) {