Skip to content

Commit d737bb1

Browse files
committed
Fixed an issue causing UI to fall back to en-US culture if CurretCulture is not defined. Now it will fall back to current Thread culture.
1 parent 2d3997d commit d737bb1

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

CrashReporter.NET/ReportCrash.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class ReportCrash
7777
/// <summary>
7878
/// Gets or Sets the current culture to use by the library.
7979
/// </summary>
80-
public CultureInfo CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
80+
public CultureInfo CurrentCulture;
8181

8282
/// <summary>
8383
/// Specify whether CrashReporter.NET should send crash reports only for new problems (duplicates detected by Doctor Dump free cloud service).
@@ -143,14 +143,10 @@ public void Send(Exception exception)
143143
{
144144
Application.EnableVisualStyles();
145145
}
146-
var parameterizedThreadStart = new ParameterizedThreadStart(delegate
147-
{
148-
new CrashReport(this).ShowDialog();
149-
});
150-
var thread = new Thread(parameterizedThreadStart) { IsBackground = false };
146+
var thread = new Thread(() => new CrashReport(this).ShowDialog()) { IsBackground = false };
151147
thread.CurrentCulture = thread.CurrentUICulture = CurrentCulture ?? Thread.CurrentThread.CurrentCulture;
152148
thread.SetApartmentState(ApartmentState.STA);
153-
thread.Start(this);
149+
thread.Start();
154150
thread.Join();
155151
}
156152
}

0 commit comments

Comments
 (0)