Skip to content

Commit 8303e30

Browse files
committed
fix(Crash): Fix crash when crashing. Be sure we can get the message and tell the user to report the issue.
Fixes SOUNDSWITCH-CH
1 parent 0b3203f commit 8303e30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SoundSwitch/Program.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ private static void HandleException(Exception exception)
223223
224224
Would you like to share more information with the developers?";
225225
var result = DialogResult.None;
226-
_synchronizationContext.Send(state =>
226+
var syncContext = _synchronizationContext ?? SynchronizationContext.Current;
227+
syncContext.Send(state =>
227228
{
228229
result = MessageBox.Show(message, $@"{Application.ProductName} crashed...", MessageBoxButtons.YesNo,
229230
MessageBoxIcon.Error);

0 commit comments

Comments
 (0)