From 9eff181e46c742e48c0367a5f1ba030edcd0bf77 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Fri, 21 Sep 2012 21:33:46 +0100 Subject: [PATCH] do not report yet violations if guithread is not set yet Without this change, the call to Gtk.Application.Init() would be reported as a violation itself. (Detected, and bugfix tested, in MonoDevelop & Banshee) --- profiler/gui-thread-check.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiler/gui-thread-check.c b/profiler/gui-thread-check.c index 8775567a4..dab046ad4 100644 --- a/profiler/gui-thread-check.c +++ b/profiler/gui-thread-check.c @@ -63,6 +63,9 @@ simple_method_enter (MonoProfiler *prof, MonoMethod *method) guithread = current_thread_id; printf ("*** GUI THREAD INITIALIZED: %u\n", guithread); } + if (!guithread_set) { + return; + } if (current_thread_id != guithread && !(strcmp (klass_name, "Object")==0 && strcmp (method_name, "Dispose")==0) && !(strcmp (klass_name, "Application")==0 && strcmp (method_name, "Invoke")==0) &&