Browse Source

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

Maurice Doison 2 năm trước cách đây
mục cha
commit
aad690da15
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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");