mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix possible update failure (doesn't help shipped code, but oh well...)
* Apparently Application.Exit() doesn't close immediately and can throw an exception, leaving the UI open while the updater tries to run and nothing works. Environment.Exit(0) should do better hopefully.
This commit is contained in:
@@ -135,12 +135,13 @@ namespace renderdocui.Windows.Dialogs
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
Application.Exit();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
// if there was an exception, display an error and don't exit.
|
||||
MessageBox.Show("Unknown error encountered while trying to launch updater!", "Error updating", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show(String.Format("Unknown error '{0}' encountered while trying to launch updater!", ex),
|
||||
"Error updating", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Close();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user