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/corlib/System.Collections/Hashtable.cs')
-rw-r--r--mcs/class/corlib/System.Collections/Hashtable.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/mcs/class/corlib/System.Collections/Hashtable.cs b/mcs/class/corlib/System.Collections/Hashtable.cs
index 36575c8e024..270bbef13ca 100644
--- a/mcs/class/corlib/System.Collections/Hashtable.cs
+++ b/mcs/class/corlib/System.Collections/Hashtable.cs
@@ -1114,8 +1114,9 @@ namespace System.Collections {
public override object Clone ()
{
- Hashtable ht = (Hashtable) host.Clone ();
- return new SyncHashtable (ht);
+ lock(host.SyncRoot) {
+ return new SyncHashtable( (Hashtable) host.Clone () );
+ }
}
} // SyncHashtable