File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -149,13 +149,13 @@ internal Assembly ResolveAssembly(AssemblyName requested)
149
149
#if DEBUG
150
150
Debug . Assert ( location . assemblyName . Version >= requested . Version ) ;
151
151
#else
152
- if ( location . assemblyName . Version < requested . Version )
153
- return default ;
152
+ if ( location . assemblyName . Version < requested . Version )
153
+ return default ;
154
154
#endif
155
155
156
156
if ( location . Assembly is null )
157
157
{
158
- // Never load an Internal assembly from an other thread than the UI thread.
158
+ // Never load an External assembly from an other thread than the UI thread.
159
159
if ( ThreadHandle . CurrentThreadId != ExternalThreadId && ExternalReferences . ContainsKey ( location . assemblyName . Name ) )
160
160
return default ;
161
161
@@ -189,13 +189,16 @@ internal Assembly ResolveAssembly(AssemblyName requested)
189
189
}
190
190
}
191
191
192
- if ( loadedAssembly is object )
192
+ lock ( location )
193
193
{
194
- try { location . Activate ( loadedAssembly ) ; }
195
- catch { }
196
- }
194
+ if ( loadedAssembly is object )
195
+ {
196
+ try { location . Activate ( loadedAssembly ) ; }
197
+ catch { }
198
+ }
197
199
198
- return location . Assembly ;
200
+ return location . Assembly ;
201
+ }
199
202
}
200
203
201
204
#if NET
You can’t perform that action at this time.
0 commit comments