[coop] Temporarily restore MonoThreadInfo when TLS destructor runs. Fixes #43099
[mono.git] / mono / utils / mono-threads-state-machine.c
index 43df55e5359359b7f7d30c7bcb685916451a4d66..9792d5dbe217f09528628012ed96ed83b8e6ee7b 100644 (file)
@@ -282,7 +282,7 @@ MonoSelfSupendResult
 mono_threads_transition_state_poll (MonoThreadInfo *info)
 {
        int raw_state, cur_state, suspend_count;
-       g_assert (info == mono_thread_info_current ());
+       g_assert (mono_thread_info_is_current (info));
 
 retry_state_change:
        UNWRAP_THREAD_STATE (raw_state, cur_state, suspend_count, info);