From 0f826f6324a67f3fff7293f99e01c9e7163726a5 Mon Sep 17 00:00:00 2001 From: Carlos Fonseca <32177100+carlfm01@users.noreply.github.com> Date: Sat, 5 Oct 2019 04:00:00 +0000 Subject: [PATCH] Add thread-safe close --- examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs b/examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs index e6bfe22e..8b38316c 100644 --- a/examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs +++ b/examples/net_framework/DeepSpeechWPF/MainWindow.xaml.cs @@ -83,7 +83,7 @@ namespace DeepSpeechWPF catch (Exception ex) { MessageBox.Show(ex.Message); - Close(); + Dispatcher.Invoke(() => { Close(); }); } }); }