Explorar o código

diagnosing Watcher exception in Action test runs

Charlie Kindel %!s(int64=2) %!d(string=hai) anos
pai
achega
d3056b7fcc
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      Terminal.Gui/Windows/FileDialog.cs

+ 2 - 3
Terminal.Gui/Windows/FileDialog.cs

@@ -116,13 +116,12 @@ namespace Terminal.Gui {
 
 		void Watcher_Error (object sender, ErrorEventArgs e)
 		{
-			Debug.WriteLine ($"Watcher error: {e.GetException ()}");
-			Application.MainLoop.Invoke (() => Reload ());
+			Application.MainLoop?.Invoke (() => Reload ());
 		}
 
 		void Watcher_Changed (object sender, FileSystemEventArgs e)
 		{
-			Application.MainLoop.Invoke (() => Reload ());
+			Application.MainLoop?.Invoke (() => Reload ());
 		}
 
 		ustring directory;