소스 검색

prevent error when writing to stderr if console closed

Nicolas Cannasse 4 년 전
부모
커밋
34a9b49e7f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      hxd/System.hl.hx

+ 1 - 1
hxd/System.hl.hx

@@ -181,7 +181,7 @@ class System {
 		#if usesys
 		haxe.System.reportError(err + stack);
 		#else
-		Sys.stderr().writeString(err + stack + "\n");
+		try Sys.stderr().writeString(err + stack + "\n") catch( e : Dynamic ) {};
 
 		if ( Sys.systemName() != 'Windows' )
 			return;