зеркало из https://github.com/mono/ikvm-fork.git
Don't NPE when -nostdlib is used without any -reference
This commit is contained in:
Родитель
14048a6620
Коммит
f9b686b757
|
@ -237,20 +237,23 @@ namespace IKVM.Internal
|
|||
|
||||
private int LoadMscorlib(IList<string> references)
|
||||
{
|
||||
Universe dummy = new Universe();
|
||||
foreach (string r in references)
|
||||
if (references != null)
|
||||
{
|
||||
try
|
||||
Universe dummy = new Universe();
|
||||
foreach (string r in references)
|
||||
{
|
||||
Assembly asm = dummy.LoadFile(r);
|
||||
if (asm.GetType("System.Object") != null)
|
||||
try
|
||||
{
|
||||
Assembly asm = dummy.LoadFile(r);
|
||||
if (asm.GetType("System.Object") != null)
|
||||
{
|
||||
StaticCompiler.Universe.LoadMscorlib(r);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
StaticCompiler.Universe.LoadMscorlib(r);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
foreach (string mscorlib in FindAssemblyPath("mscorlib.dll"))
|
||||
|
|
Загрузка…
Ссылка в новой задаче