diff options
Diffstat (limited to 'mcs/class/corlib/System.Collections/Hashtable.cs')
-rw-r--r-- | mcs/class/corlib/System.Collections/Hashtable.cs | 5 |
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 |