Fix: getenv can return null
[lttng-tools.git] / src / common / time.c
index 5519e3ab4715240cfd1b27ef7701d36c1b737039..a01c16df5c44f024c00469beeaa014542c658c9f 100644 (file)
@@ -76,7 +76,7 @@ void __attribute__((constructor)) init_locale_utf8_support(void)
 
        if (program_locale && strstr(program_locale, "utf8")) {
                utf8_output_supported = true;
-       } else if (strstr(lang, "utf8")) {
+       } else if (lang && strstr(lang, "utf8")) {
                utf8_output_supported = true;
        }
 }
This page took 0.024166 seconds and 4 git commands to generate.