Fix crash in local passcode reset.

This commit is contained in:
John Preston 2019-08-12 16:55:44 +01:00
parent 1139a59818
commit 3f041545bf
2 changed files with 4 additions and 2 deletions

View File

@ -583,6 +583,10 @@ void Application::lockByPasscode() {
void Application::unlockPasscode() {
clearPasscodeLock();
if (!activeAccount().mtp()) {
// We unlocked initial passcode, so we just start mtproto.
activeAccount().startMtp();
}
if (_window) {
_window->clearPasscodeLock();
}

View File

@ -368,8 +368,6 @@ void Account::logOut() {
}));
} else {
// We log out because we've forgotten passcode.
// So we just start mtproto from scratch.
startMtp();
loggedOut();
}
}