From ba55cfa413c73543b8ac620e3908ad69966fdc3e Mon Sep 17 00:00:00 2001 From: Daniil Kutz Date: Mon, 8 Sep 2025 17:42:16 +0300 Subject: [PATCH] Check type variable on null before dereferencing --- icu4c/source/common/udata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/common/udata.cpp b/icu4c/source/common/udata.cpp index b9b737f177ed..b53ec191aa34 100644 --- a/icu4c/source/common/udata.cpp +++ b/icu4c/source/common/udata.cpp @@ -1291,7 +1291,7 @@ doOpenChoice(const char *path, const char *type, const char *name, dataPath = u_getDataDirectory(); /**** Time zone individual files override */ - if (isICUData && isTimeZoneFile(name, type)) { + if (isICUData && type!=nullptr && isTimeZoneFile(name, type)) { const char *tzFilesDir = u_getTimeZoneFilesDirectory(pErrorCode); if (tzFilesDir[0] != 0) { #ifdef UDATA_DEBUG