# HG changeset patch # User Juanma Barranquero # Date 1228313622 0 # Node ID 038d7d21b7861d012baace4b999b882095ff21f6 # Parent 56005ec017c37507e368ec6b57ddbdd79b2b009b * w32.c (init_environment): Don't free handle to library shell32.dll. diff -r 56005ec017c3 -r 038d7d21b786 src/ChangeLog --- a/src/ChangeLog Wed Dec 03 08:21:08 2008 +0000 +++ b/src/ChangeLog Wed Dec 03 14:13:42 2008 +0000 @@ -1,3 +1,7 @@ +2008-12-03 Juanma Barranquero + + * w32.c (init_environment): Don't free handle to library shell32.dll. + 2008-12-03 Kenichi Handa * font.c (font_at): Set `multibyte' at first. diff -r 56005ec017c3 -r 038d7d21b786 src/w32.c --- a/src/w32.c Wed Dec 03 08:21:08 2008 +0000 +++ b/src/w32.c Wed Dec 03 14:13:42 2008 +0000 @@ -1443,12 +1443,10 @@ HRESULT profile_result; /* Dynamically load ShGetFolderPath, as it won't exist on versions of Windows 95 and NT4 that have not been updated to include - MSIE 5. Also we don't link with shell32.dll by default. */ - HMODULE shell32_dll; + MSIE 5. */ ShGetFolderPath_fn get_folder_path; - shell32_dll = GetModuleHandle ("shell32.dll"); get_folder_path = (ShGetFolderPath_fn) - GetProcAddress (shell32_dll, "SHGetFolderPathA"); + GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); if (get_folder_path != NULL) { @@ -1459,9 +1457,6 @@ if (profile_result == S_OK) env_vars[0].def_value = default_home; } - - /* Unload shell32.dll, it is not needed anymore. */ - FreeLibrary (shell32_dll); } /* Get default locale info and use it for LANG. */