[threads] Ensure we have balanced appdomain push/pop when attaching the thread on...
authorLudovic Henry <ludovic@xamarin.com>
Wed, 22 Feb 2017 19:55:59 +0000 (14:55 -0500)
committerGitHub <noreply@github.com>
Wed, 22 Feb 2017 19:55:59 +0000 (14:55 -0500)
mono/metadata/threads.c

index fd2fe7315d0efae144b189dd198bf5c70db6db73..f232f94f64820be086554c8a11f00ce0448ac7ce 100644 (file)
@@ -695,6 +695,7 @@ mono_thread_attach_internal (MonoThread *thread, gboolean force_attach, gboolean
 
        if (shutting_down && !force_attach) {
                mono_threads_unlock ();
+               mono_thread_pop_appdomain_ref ();
                return FALSE;
        }