From 5c18cca1ca8151e28dc5070d935b3b4e79c11b58 Mon Sep 17 00:00:00 2001 From: Totoki Kei Date: Sat, 4 Jun 2022 12:21:20 +0900 Subject: [PATCH] [core:testing] add global_fail_timeout_thread nil check Fixed an issue where test would always fail unless set_fail_timeout was called. --- core/testing/runner_windows.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/testing/runner_windows.odin b/core/testing/runner_windows.odin index e812c410a..525eae685 100644 --- a/core/testing/runner_windows.odin +++ b/core/testing/runner_windows.odin @@ -203,7 +203,7 @@ run_internal_test :: proc(t: ^T, it: Internal_Test) { thread.it.p(t) sema_post(&global_fail_timeout_semaphore) - thread_join_and_destroy(global_fail_timeout_thread) + if global_fail_timeout_thread != nil do thread_join_and_destroy(global_fail_timeout_thread) thread.success = true sema_post(&global_threaded_runner_semaphore)