diff --git a/SidebarDiagnostics/App.xaml.cs b/SidebarDiagnostics/App.xaml.cs index 85862ad..ca7022c 100644 --- a/SidebarDiagnostics/App.xaml.cs +++ b/SidebarDiagnostics/App.xaml.cs @@ -22,14 +22,17 @@ protected async override void OnStartup(StartupEventArgs e) { base.OnStartup(e); - // UPDATE + // ERROR HANDLING #if !DEBUG - await SquirrelUpdate(false); + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_Error); #endif - // ERROR HANDLING + // UPDATE #if !DEBUG - AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_Error); + if (Framework.Settings.Instance.AutoUpdate) + { + await SquirrelUpdate(false); + } #endif // SETTINGS