aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2008-12-03 14:13:42 +0000
committerJuanma Barranquero2008-12-03 14:13:42 +0000
commit8b8be8eb0e3ceeca481db18be44a24113b4a4860 (patch)
tree8bdfe7a448580d2e8d36097d3292505161266553 /src
parent61cf9fadd4bc276f7f1eece4faeffad9338e0da7 (diff)
downloademacs-8b8be8eb0e3ceeca481db18be44a24113b4a4860.tar.gz
emacs-8b8be8eb0e3ceeca481db18be44a24113b4a4860.zip
* w32.c (init_environment): Don't free handle to library shell32.dll.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 48448c3b95c..9a8f6384ae5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12008-12-03 Juanma Barranquero <lekktu@gmail.com>
2
3 * w32.c (init_environment): Don't free handle to library shell32.dll.
4
12008-12-03 Kenichi Handa <handa@m17n.org> 52008-12-03 Kenichi Handa <handa@m17n.org>
2 6
3 * font.c (font_at): Set `multibyte' at first. 7 * font.c (font_at): Set `multibyte' at first.
diff --git a/src/w32.c b/src/w32.c
index 1032ac57af6..c6660c0d3d6 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1443,12 +1443,10 @@ init_environment (char ** argv)
1443 HRESULT profile_result; 1443 HRESULT profile_result;
1444 /* Dynamically load ShGetFolderPath, as it won't exist on versions 1444 /* Dynamically load ShGetFolderPath, as it won't exist on versions
1445 of Windows 95 and NT4 that have not been updated to include 1445 of Windows 95 and NT4 that have not been updated to include
1446 MSIE 5. Also we don't link with shell32.dll by default. */ 1446 MSIE 5. */
1447 HMODULE shell32_dll;
1448 ShGetFolderPath_fn get_folder_path; 1447 ShGetFolderPath_fn get_folder_path;
1449 shell32_dll = GetModuleHandle ("shell32.dll");
1450 get_folder_path = (ShGetFolderPath_fn) 1448 get_folder_path = (ShGetFolderPath_fn)
1451 GetProcAddress (shell32_dll, "SHGetFolderPathA"); 1449 GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA");
1452 1450
1453 if (get_folder_path != NULL) 1451 if (get_folder_path != NULL)
1454 { 1452 {
@@ -1459,9 +1457,6 @@ init_environment (char ** argv)
1459 if (profile_result == S_OK) 1457 if (profile_result == S_OK)
1460 env_vars[0].def_value = default_home; 1458 env_vars[0].def_value = default_home;
1461 } 1459 }
1462
1463 /* Unload shell32.dll, it is not needed anymore. */
1464 FreeLibrary (shell32_dll);
1465 } 1460 }
1466 1461
1467 /* Get default locale info and use it for LANG. */ 1462 /* Get default locale info and use it for LANG. */