Skip to content

Commit

Permalink
Fix crash report thread apartment
Browse files Browse the repository at this point in the history
  • Loading branch information
Kryptos-FR committed Sep 11, 2024
1 parent e220654 commit 0bdaad2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public static void HandleException(Dispatcher dispatcher, Exception exception)
terminating = true;

var englishCulture = new CultureInfo("en-US");
var crashLogThread = new Thread(CrashReport) { CurrentUICulture = englishCulture, CurrentCulture = englishCulture };
var crashLogThread = new Thread(CrashReport)
{
CurrentUICulture = englishCulture,
CurrentCulture = englishCulture
};
crashLogThread.SetApartmentState(ApartmentState.STA);
crashLogThread.Start(new CrashReportArgs(exception, dispatcher));
crashLogThread.Join();
}
Expand Down

0 comments on commit 0bdaad2

Please sign in to comment.