diff --git a/Desktop.Linux/ViewModels/MainWindowViewModel.cs b/Desktop.Linux/ViewModels/MainWindowViewModel.cs index a2d7a7a2a..34683efc0 100644 --- a/Desktop.Linux/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Linux/ViewModels/MainWindowViewModel.cs @@ -217,7 +217,7 @@ public async Task PromptForHostName() } } - private static void BuildServices() + private void BuildServices() { var serviceCollection = new ServiceCollection(); serviceCollection.AddLogging(builder => diff --git a/Desktop.Win/ViewModels/MainWindowViewModel.cs b/Desktop.Win/ViewModels/MainWindowViewModel.cs index a2c2adbe0..a67aea08e 100644 --- a/Desktop.Win/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Win/ViewModels/MainWindowViewModel.cs @@ -246,7 +246,7 @@ public void PromptForHostName() } } - private static void BuildServices() + private void BuildServices() { var serviceCollection = new ServiceCollection(); serviceCollection.AddLogging(builder => diff --git a/ScreenCast.Win/Services/WinClipboardService.cs b/ScreenCast.Win/Services/WinClipboardService.cs index f1ea91cf5..2dde8109b 100644 --- a/ScreenCast.Win/Services/WinClipboardService.cs +++ b/ScreenCast.Win/Services/WinClipboardService.cs @@ -32,7 +32,7 @@ public void BeginWatching() if (Clipboard.ContainsText()) { ClipboardText = Clipboard.GetText(); - ClipboardTextChanged.Invoke(this, ClipboardText); + ClipboardTextChanged?.Invoke(this, ClipboardText); } ClipboardWatcher = new System.Timers.Timer(500); } @@ -56,7 +56,7 @@ private void ClipboardWatcher_Elapsed(object sender, System.Timers.ElapsedEventA if (Clipboard.ContainsText() && Clipboard.GetText() != ClipboardText) { ClipboardText = Clipboard.GetText(); - ClipboardTextChanged.Invoke(this, ClipboardText); + ClipboardTextChanged?.Invoke(this, ClipboardText); } } catch { }