[runtime] Fix a test so it works with bitcode, stack traces might contain wrapper...
authorZoltan Varga <vargaz@gmail.com>
Wed, 26 Oct 2016 22:10:49 +0000 (18:10 -0400)
committerZoltan Varga <vargaz@gmail.com>
Wed, 26 Oct 2016 22:10:54 +0000 (18:10 -0400)
mono/tests/generic-stack-traces.2.cs

index 340b28f2678511b1bba7f8a9aadc9fac4502e3c5..499cf9e8d0075fb7e82282a5fd2fa29de18eb3d3 100644 (file)
@@ -38,6 +38,8 @@ public class main {
        for (int i = 0; i < st.FrameCount; ++i) {
            StackFrame sf = st.GetFrame (i);
            MethodBase m = sf.GetMethod ();
+               if (m == null)
+                       continue;
            Type t = m.DeclaringType;
            if (m.IsGenericMethod) {
                Type[] margs = m.GetGenericArguments ();