Added null check to closePopup method

This commit is contained in:
RaphiMC 2023-12-04 18:52:18 +01:00
parent 4b30f6c512
commit b9e4b6cb75
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94

View File

@ -218,11 +218,13 @@ public class AccountsTab extends AUITab {
if (!model.isEmpty()) this.markSelected(0);
}
private void closePopup() {
this.addAccountPopup.markExternalClose();
this.addAccountPopup.setVisible(false);
this.addAccountPopup.dispose();
this.addAccountPopup = null;
private void closePopup() { // Might be getting called multiple times
if (this.addAccountPopup != null) {
this.addAccountPopup.markExternalClose();
this.addAccountPopup.setVisible(false);
this.addAccountPopup.dispose();
this.addAccountPopup = null;
}
this.addMicrosoftAccountButton.setEnabled(true);
this.addBedrockAccountButton.setEnabled(true);
}