Commit b3415b03 authored by Sven Paschukat's avatar Sven Paschukat Committed by Alexandre Julliard

Repaired extraction of icons when config file is missing.

parent 5cee3988
...@@ -457,10 +457,7 @@ static char *extract_icon( LPCWSTR path, int index) ...@@ -457,10 +457,7 @@ static char *extract_icon( LPCWSTR path, int index)
iconsdirW = HeapAlloc(GetProcessHeap(), 0, size); iconsdirW = HeapAlloc(GetProcessHeap(), 0, size);
RegQueryValueExW(hkey, IconsDirW, 0, NULL, (LPBYTE)iconsdirW, &size); RegQueryValueExW(hkey, IconsDirW, 0, NULL, (LPBYTE)iconsdirW, &size);
s = wine_get_unix_file_name(iconsdirW); if (!(iconsdir = wine_get_unix_file_name(iconsdirW)))
if (s)
iconsdir = s;
else
{ {
int n = WideCharToMultiByte(CP_UNIXCP, 0, iconsdirW, -1, NULL, 0, NULL, NULL); int n = WideCharToMultiByte(CP_UNIXCP, 0, iconsdirW, -1, NULL, 0, NULL, NULL);
iconsdir = HeapAlloc(GetProcessHeap(), 0, n); iconsdir = HeapAlloc(GetProcessHeap(), 0, n);
...@@ -468,19 +465,16 @@ static char *extract_icon( LPCWSTR path, int index) ...@@ -468,19 +465,16 @@ static char *extract_icon( LPCWSTR path, int index)
} }
HeapFree(GetProcessHeap(), 0, iconsdirW); HeapFree(GetProcessHeap(), 0, iconsdirW);
} }
else
{
WCHAR path[MAX_PATH];
if (GetTempPathW(MAX_PATH, path))
{
s = wine_get_unix_file_name(path);
if (s)
iconsdir = s;
}
}
RegCloseKey( hkey ); RegCloseKey( hkey );
} }
if (!iconsdir)
{
WCHAR path[MAX_PATH];
if (GetTempPathW(MAX_PATH, path)) iconsdir = wine_get_unix_file_name(path);
}
if (!iconsdir) if (!iconsdir)
return NULL; /* No icon created */ return NULL; /* No icon created */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment