7167359: (tz) SEGV on solaris if TZ variable not set

Reviewed-by: okutsu
This commit is contained in:
Sean Coffey 2012-05-11 10:09:18 +01:00
parent abd7e74713
commit 6e335b3720

View File

@ -651,7 +651,7 @@ findJavaTZ_md(const char *java_home_dir, const char *country)
}
#ifdef __solaris__
if (strcmp(tz, "localtime") == 0) {
if (tz != NULL && strcmp(tz, "localtime") == 0) {
tz = getSolarisDefaultZoneID();
freetz = tz;
}