We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d74a1b commit a5c4be5Copy full SHA for a5c4be5
TuneLab/App.axaml.cs
@@ -77,12 +77,7 @@ public override void OnFrameworkInitializationCompleted()
77
}
78
79
// 获取主线程SynchronizationContext
80
- var context = SynchronizationContext.Current;
81
- if (context == null)
82
- {
83
- Log.Error("SynchronizationContext.Current is null");
84
- return;
85
- }
+ var context = SynchronizationContext.Current ?? throw new InvalidOperationException("SynchronizationContext.Current is null");
86
87
// 监听其他实例的启动参数
88
Task.Run(() =>
0 commit comments