Index: dll/win32/wininet/urlcache.c =================================================================== --- dll/win32/wininet/urlcache.c (revision 50814) +++ dll/win32/wininet/urlcache.c (working copy) @@ -527,6 +527,7 @@ static const WCHAR HistoryPrefix[] = {'V','i','s','i','t','e','d',':',0}; static const WCHAR CookieSuffix[] = {0}; static const WCHAR CookiePrefix[] = {'C','o','o','k','i','e',':',0}; + static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0}; static const struct { int nFolder; /* CSIDL_* constant */ @@ -540,6 +541,12 @@ }; DWORD i; + if (GetEnvironmentVariableW(UserProfile, NULL, 0) == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) + { + TRACE("Environment variable 'USERPROFILE' does not exist!\n"); + return; + } + for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) { WCHAR wszCachePath[MAX_PATH];