|
@@ -277,7 +277,18 @@ internal partial class MainWindow : Window
|
|
|
|
|
|
private void MainWindow_Initialized(object sender, EventArgs e)
|
|
|
{
|
|
|
- AppDomain.CurrentDomain.UnhandledException += (sender, e) => Helpers.CrashHelper.SaveCrashInfo((Exception)e.ExceptionObject);
|
|
|
+ AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ DataContext.AutosaveAllForNextSession();
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ CrashHelper.SaveCrashInfo((Exception)e.ExceptionObject);
|
|
|
+
|
|
|
+ }
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
private void MainWindow_Drop(object sender, DragEventArgs e)
|