mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fix crash in password submit.
This commit is contained in:
parent
a6c76382e3
commit
f1b4a82015
1 changed files with 6 additions and 4 deletions
|
@ -187,16 +187,18 @@ void PasswordCheckWidget::requestPasswordData() {
|
|||
).done([=](const MTPaccount_Password &result) {
|
||||
_sentRequest = 0;
|
||||
result.match([&](const MTPDaccount_password &data) {
|
||||
_request = Core::ParseCloudPasswordCheckRequest(data);
|
||||
auto request = Core::ParseCloudPasswordCheckRequest(data);
|
||||
if (request && request.id) {
|
||||
_request = std::move(request);
|
||||
} else {
|
||||
// Maybe the password was removed? Just submit it once again.
|
||||
}
|
||||
passwordChecked();
|
||||
});
|
||||
}).send();
|
||||
}
|
||||
|
||||
void PasswordCheckWidget::passwordChecked() {
|
||||
if (!_request || !_request.id) {
|
||||
return serverError();
|
||||
}
|
||||
const auto check = Core::ComputeCloudPasswordCheck(
|
||||
_request,
|
||||
_passwordHash);
|
||||
|
|
Loading…
Add table
Reference in a new issue