Do not throw an assertion on no mscorlib
authorMichael Letterle <mletterle@preemptive.com>
Fri, 31 Mar 2017 15:32:32 +0000 (11:32 -0400)
committerRuss Keldorph <russ.keldorph@microsoft.com>
Tue, 18 Apr 2017 02:21:54 +0000 (19:21 -0700)
It's okay to use debuggable attributes from other BaseAsmRef's

Fixes dotnet/coreclr#10608

Commit migrated from https://github.com/dotnet/coreclr/commit/80f4485197c62b13fa6cbaaab06a2c184e5ed316

src/coreclr/src/ilasm/asmman.cpp

index 0f0d1cf..22e780f 100644 (file)
@@ -297,9 +297,10 @@ void AsmMan::EmitDebuggableAttribute(mdToken tkOwner)
     else
     {
         AsmManAssembly *pAssembly = GetAsmRefByName("mscorlib");
-        _ASSERTE(pAssembly != NULL);
-        PREFIX_ASSUME(pAssembly != NULL);
-        fOldStyle = (pAssembly->usVerMajor == 1);
+        if(pAssembly != NULL)
+        {
+            fOldStyle = (pAssembly->usVerMajor == 1);
+        }   
     }
 
     bsBytes->appendInt8(1);