Merge pull request #4621 from alexanderkyte/strdup_env
[mono.git] / mono / utils / mono-threads-coop.c
index c7ad2cedd416318e210e14ebcaebb3134b3ba431..0d5f1e9b73577e3ce129005e5dedf4de73dc3972 100644 (file)
@@ -430,7 +430,7 @@ mono_threads_is_coop_enabled (void)
 #else
        static int is_coop_enabled = -1;
        if (G_UNLIKELY (is_coop_enabled == -1))
-               is_coop_enabled = g_getenv ("MONO_ENABLE_COOP") != NULL ? 1 : 0;
+               is_coop_enabled = g_hasenv ("MONO_ENABLE_COOP") ? 1 : 0;
        return is_coop_enabled == 1;
 #endif
 }