Skip to content

Commit 67fb7fe

Browse files
committed
Fixing debugger crash that occurs on either debugger detach or editor close (case 1354671)
1 parent 7f8e521 commit 67fb7fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/mini/debugger-agent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4262,7 +4262,7 @@ thread_end (MonoProfiler *prof, uintptr_t tid)
42624262
if (thread) {
42634263
mono_g_hash_table_remove (tid_to_thread_obj, GUINT_TO_POINTER (tid));
42644264
tls = (DebuggerTlsData *)mono_g_hash_table_lookup (thread_to_tls, thread);
4265-
if (tls) {
4265+
if (tls && !tls->terminated) {
42664266
/* FIXME: Maybe we need to free this instead, but some code can't handle that */
42674267
tls->terminated = TRUE;
42684268
/* Can't remove from tid_to_thread, as that would defeat the check in thread_start () */

0 commit comments

Comments
 (0)