mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +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) {
|
).done([=](const MTPaccount_Password &result) {
|
||||||
_sentRequest = 0;
|
_sentRequest = 0;
|
||||||
result.match([&](const MTPDaccount_password &data) {
|
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();
|
passwordChecked();
|
||||||
});
|
});
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasswordCheckWidget::passwordChecked() {
|
void PasswordCheckWidget::passwordChecked() {
|
||||||
if (!_request || !_request.id) {
|
|
||||||
return serverError();
|
|
||||||
}
|
|
||||||
const auto check = Core::ComputeCloudPasswordCheck(
|
const auto check = Core::ComputeCloudPasswordCheck(
|
||||||
_request,
|
_request,
|
||||||
_passwordHash);
|
_passwordHash);
|
||||||
|
|
Loading…
Add table
Reference in a new issue