mirror of
https://github.com/JuniorDark/RustyHearts-Launcher.git
synced 2026-05-07 13:31:45 -04:00
Fix bug related to collection modification during Application.Restart() on ChangePassword.
This commit is contained in:
parent
46b2b6f15d
commit
d5ec712d0f
3 changed files with 26 additions and 15 deletions
|
|
@ -460,19 +460,24 @@ namespace RHLauncher
|
|||
|
||||
public void Logout()
|
||||
{
|
||||
LoginForm? loginForm = Application.OpenForms.OfType<LoginForm>().FirstOrDefault();
|
||||
LoginForm loginForm = Application.OpenForms.OfType<LoginForm>().FirstOrDefault();
|
||||
if (loginForm != null)
|
||||
{
|
||||
// Close the current form before restarting
|
||||
Close();
|
||||
|
||||
// Restart the application
|
||||
Application.Restart();
|
||||
}
|
||||
else
|
||||
{
|
||||
LoginForm newLoginForm = new();
|
||||
LoginForm newLoginForm = new LoginForm();
|
||||
newLoginForm.Show();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async void UpdateCheckButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
HidePanels();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue