mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixes System.NullReferenceException exception.
This commit is contained in:
@@ -116,11 +116,17 @@ namespace Terminal.Gui {
|
|||||||
|
|
||||||
void Watcher_Error (object sender, ErrorEventArgs e)
|
void Watcher_Error (object sender, ErrorEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (Application.MainLoop == null)
|
||||||
|
return;
|
||||||
|
|
||||||
Application.MainLoop.Invoke (() => Reload ());
|
Application.MainLoop.Invoke (() => Reload ());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Watcher_Changed (object sender, FileSystemEventArgs e)
|
void Watcher_Changed (object sender, FileSystemEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (Application.MainLoop == null)
|
||||||
|
return;
|
||||||
|
|
||||||
Application.MainLoop.Invoke (() => Reload ());
|
Application.MainLoop.Invoke (() => Reload ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user