From 284e8077d66b6ed4796ee92de5b5d9b08419392b Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 26 May 2021 19:20:23 +0800 Subject: [PATCH] fix: fix crash when open repository after init --- src/Views/Popups/Init.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Popups/Init.xaml.cs b/src/Views/Popups/Init.xaml.cs index 08a3bcbf..53deb24d 100644 --- a/src/Views/Popups/Init.xaml.cs +++ b/src/Views/Popups/Init.xaml.cs @@ -23,7 +23,7 @@ namespace SourceGit.Views.Popups { if (!succ) return false; var repo = Models.Preference.Instance.AddRepository(WorkDir, WorkDir + "\\.git", ""); - Models.Watcher.Open(repo); + Dispatcher.Invoke(() => Models.Watcher.Open(repo)); return true; }); }