mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 23:55:12 +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()) {
|
if (auto mtproto = Messenger::Instance().mtp()) {
|
||||||
mtproto->logout(rpcDone(&loggedOut), rpcFail(&loggedOut));
|
mtproto->logout(rpcDone(&loggedOut), rpcFail(&loggedOut));
|
||||||
} else {
|
} else {
|
||||||
loggedOut();
|
// We log out because we've forgotten passcode.
|
||||||
|
// So we just start mtproto from scratch.
|
||||||
Messenger::Instance().startMtp();
|
Messenger::Instance().startMtp();
|
||||||
|
loggedOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user