mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix(LaunchController): don't remove account unless we have a new one
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
bf8d1ca1f8
commit
f6d1b29b04
1 changed files with 1 additions and 1 deletions
|
|
@ -333,11 +333,11 @@ bool LaunchController::reauthenticateAccount(const MinecraftAccountPtr& account,
|
|||
if (button == QMessageBox::StandardButton::Yes) {
|
||||
auto* accounts = APPLICATION->accounts();
|
||||
const bool isDefault = accounts->defaultAccount() == account;
|
||||
accounts->removeAccount(accounts->index(accounts->findAccountByProfileId(account->profileId())));
|
||||
if (account->accountType() == AccountType::MSA) {
|
||||
auto newAccount = MSALoginDialog::newAccount(m_parentWidget);
|
||||
|
||||
if (newAccount != nullptr) {
|
||||
accounts->removeAccount(accounts->index(accounts->findAccountByProfileId(account->profileId())));
|
||||
accounts->addAccount(newAccount);
|
||||
|
||||
if (isDefault) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue