2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 14:08:41 +00:00

Fix crash after account reset after QR login.

This commit is contained in:
John Preston
2021-01-22 18:19:27 +04:00
parent 606f5377d5
commit f90e13f8b1

View File

@@ -478,10 +478,17 @@ void Widget::resetAccount() {
_resetRequest = 0; _resetRequest = 0;
Ui::hideLayer(); Ui::hideLayer();
if (getData()->phone.isEmpty()) {
moveToStep(
new QrWidget(this, _account, getData()),
StackAction::Replace,
Animate::Back);
} else {
moveToStep( moveToStep(
new SignupWidget(this, _account, getData()), new SignupWidget(this, _account, getData()),
StackAction::Replace, StackAction::Replace,
Animate::Forward); Animate::Forward);
}
}).fail([=](const RPCError &error) { }).fail([=](const RPCError &error) {
_resetRequest = 0; _resetRequest = 0;