浏览代码

another cleanup fix

Nicolas Cannasse 3 年之前
父节点
当前提交
ab562bac0e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main.c

+ 2 - 2
src/main.c

@@ -240,13 +240,13 @@ int main(int argc, pchar *argv[]) {
 			uprintf(USTR("Called from %s\n"), hl_aptr(a,uchar*)[i]);
 		hl_debug_break();
 		hl_global_free();
-		hl_unregister_thread();
 		return 1;
 	}
 	hl_module_free(ctx.m);
 	hl_free(&ctx.code->alloc);
+	// do not call hl_unregister_thread() or hl_global_free will display error 
+	// on global_lock if there are threads that are still running (such as debugger)
 	hl_global_free();
-	hl_unregister_thread();
 	return 0;
 }