2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix crash in passcode setup.

This commit is contained in:
John Preston
2019-03-04 22:40:21 +04:00
parent c27456277e
commit f4544b0964
3 changed files with 16 additions and 2 deletions

View File

@@ -452,10 +452,13 @@ void PasscodeBox::save(bool force) {
changeCloudPassword(old, pwd);
}
} else {
const auto weak = make_weak(this);
cSetPasscodeBadTries(0);
Local::setPasscode(pwd.toUtf8());
Auth().checkAutoLock();
closeBox();
Auth().localPasscodeChanged();
if (weak) {
closeBox();
}
}
}