Sfoglia il codice sorgente

[cs] avoid null exception when throwing error
It happened to me when running the sys tests using mono 4.2.1 on Windows.

Andy Li 9 anni fa
parent
commit
78b12dfe31
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      std/haxe/CallStack.hx

+ 3 - 0
std/haxe/CallStack.hx

@@ -328,6 +328,9 @@ class CallStack {
 				var frame = s.GetFrame(i);
 				var m = frame.GetMethod();
 
+				if (m == null) {
+					continue;
+				}
 				var method = StackItem.Method(m.ReflectedType.ToString(), m.Name);
 
 				var fileName = frame.GetFileName();