瀏覽代碼

Don't handle exceptions from non-hashlink threads (#609)

Maurice Doison 2 年之前
父節點
當前提交
aad690da15
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/std/fun.c

+ 1 - 0
src/std/fun.c

@@ -446,6 +446,7 @@ DEFINE_PRIM(_BOOL, is_prim_loaded, _DYN);
 
 #if defined(HL_VCC) && !defined(HL_XBO)
 static LONG CALLBACK global_handler( PEXCEPTION_POINTERS inf ) {
+	if( hl_get_thread() == NULL ) return EXCEPTION_CONTINUE_SEARCH;
 	switch( inf->ExceptionRecord->ExceptionCode ) {
 	case EXCEPTION_ACCESS_VIOLATION: hl_error("Access violation");
 	case EXCEPTION_STACK_OVERFLOW: hl_error("Stack overflow");