Fix another bug in mono_profiler_load ().
authorZoltan Varga <vargaz@gmail.com>
Fri, 4 Nov 2011 17:53:53 +0000 (18:53 +0100)
committerZoltan Varga <vargaz@gmail.com>
Fri, 4 Nov 2011 17:54:11 +0000 (18:54 +0100)
mono/metadata/profiler.c

index 5de7b8e9903351a59cd54f55c918c4a2ee216678..22b1ac580bc55efaf9ed48d8f1e8a8f1fac5ddc6 100644 (file)
@@ -1151,14 +1151,14 @@ mono_profiler_load (const char *desc)
                }
                if (!load_embedded_profiler (desc, mname)) {
                        libname = g_strdup_printf ("mono-profiler-%s", mname);
-                       if (!load_profiler_from_directory (NULL, libname, desc))
+                       if (!load_profiler_from_directory (NULL, libname, desc)) {
+                               res = FALSE;
 #if defined (MONO_ASSEMBLIES)
                                res = load_profiler_from_directory (mono_assembly_getrootdir (), libname, desc);
-#else
-                               res = FALSE;
 #endif
                                if (!res)
                                        g_warning ("The '%s' profiler wasn't found in the main executable nor could it be loaded from '%s'.", mname, libname);
+                       }
                        g_free (libname);
                }
                g_free (mname);