mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fixing crash in logout from passcode.
If the MTP::Instance is not started yet (we forgot our passcode), the logout attempt was attempting to use mtproto from Intro::Widget constructor before it was created. Now we create it before logout.
This commit is contained in:
@@ -229,8 +229,10 @@ namespace {
|
||||
if (auto mtproto = Messenger::Instance().mtp()) {
|
||||
mtproto->logout(rpcDone(&loggedOut), rpcFail(&loggedOut));
|
||||
} else {
|
||||
loggedOut();
|
||||
// We log out because we've forgotten passcode.
|
||||
// So we just start mtproto from scratch.
|
||||
Messenger::Instance().startMtp();
|
||||
loggedOut();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user