소스 검색

[cs] return an empty array from CallStack.exceptionStack() if there were no exceptions (fixes #8124)

Alexander Kuzmenko 6 년 전
부모
커밋
3b56c342e2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/haxe/CallStack.hx

+ 1 - 1
std/haxe/CallStack.hx

@@ -210,7 +210,7 @@ class CallStack {
 			}
 			return stack;
 		#elseif cs
-			return makeStack(new cs.system.diagnostics.StackTrace(cs.internal.Exceptions.exception, true));
+			return cs.internal.Exceptions.exception == null ? [] : makeStack(new cs.system.diagnostics.StackTrace(cs.internal.Exceptions.exception, true));
 		#elseif python
 			var stack = [];
 			var exc = python.lib.Sys.exc_info();