diff --git a/dll/win32/kernel32/winnls/string/locale.c b/dll/win32/kernel32/winnls/string/locale.c index dea44b16ddf..3a26c757d73 100644 --- a/dll/win32/kernel32/winnls/string/locale.c +++ b/dll/win32/kernel32/winnls/string/locale.c @@ -1790,7 +1790,7 @@ INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len) if (!lcid) return 0; /* special handling for neutral locale names */ - if (info == LOCALE_SNAME && strlenW(locale) == 2) + if (info == LOCALE_SNAME && locale && strlenW(locale) == 2) { if (len && len < 3) {