Fix my profiler loader.
authorMiguel de Icaza <miguel@gnome.org>
Tue, 20 Sep 2011 02:53:17 +0000 (22:53 -0400)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 20 Sep 2011 02:54:44 +0000 (22:54 -0400)
This is what happens when you test on a pre-configured environment that
already worked fine.    This depended on a function that was never called
so we ended up probing for paths on NULL (repeating the same process twice)
instead of loading the profiler from the installation directory.

mono/metadata/profiler.c

index b67945aa2ba17543732caf5e5305b58e075e1e6f..0db41605c71c92ff96376752bf4f51f09165718b 100644 (file)
@@ -1119,7 +1119,7 @@ mono_profiler_load (const char *desc)
                }
                libname = g_strdup_printf ("mono-profiler-%s", mname);
                if (!load_profiler_from_directory (NULL, libname, desc))
-                       if (!load_profiler_from_directory (mono_assembly_getrootdir (), libname, desc))
+                       if (!load_profiler_from_directory (MONO_ASSEMBLIES, libname, desc))
                                g_warning ("Error loading profiler module '%s'", libname);
                        
                g_free (libname);