Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System/System.IO/FileSystemWatcher.cs')
-rw-r--r--mcs/class/System/System.IO/FileSystemWatcher.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/mcs/class/System/System.IO/FileSystemWatcher.cs b/mcs/class/System/System.IO/FileSystemWatcher.cs
index adfd9cfc336..b7ad29d0c08 100644
--- a/mcs/class/System/System.IO/FileSystemWatcher.cs
+++ b/mcs/class/System/System.IO/FileSystemWatcher.cs
@@ -420,6 +420,8 @@ namespace System.IO {
}
private void RaiseEvent (Delegate ev, EventArgs arg, EventType evtype)
{
+ if (disposed)
+ return;
if (ev == null)
return;
@@ -497,11 +499,15 @@ namespace System.IO {
internal void DispatchErrorEvents (ErrorEventArgs args)
{
+ if (disposed)
+ return;
OnError (args);
}
internal void DispatchEvents (FileAction act, string filename, ref RenamedEventArgs renamed)
{
+ if (disposed)
+ return;
if (waiting) {
lastData = new WaitForChangedResult ();
}