/pidgin/main: d44a3e57992c: Win32: silence perl check
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Sat Jun 8 12:30:43 EDT 2013
Changeset: d44a3e57992cc4fdcf0219dcee2ff62adbe1fb86
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-06-08 18:30 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/d44a3e57992c
Description:
Win32: silence perl check
diffstat:
pidgin/win32/winpidgin.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (25 lines):
diff --git a/pidgin/win32/winpidgin.c b/pidgin/win32/winpidgin.c
--- a/pidgin/win32/winpidgin.c
+++ b/pidgin/win32/winpidgin.c
@@ -74,6 +74,11 @@ static BOOL reg_value_exists(HKEY key, w
if (retv != ERROR_SUCCESS)
return FALSE;
+ if (val_name[0] == L'\0') {
+ RegCloseKey(hkey);
+ return TRUE;
+ }
+
index = 0;
while (TRUE)
{
@@ -505,7 +510,8 @@ static void winpidgin_add_stuff_to_path(
printf("%s", "Looking for Perl... ");
plen = sizeof(perl_path) / sizeof(wchar_t);
- if (read_reg_string(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Perl", L"",
+ if (reg_value_exists(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Perl", L"") &&
+ read_reg_string(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Perl", L"",
(LPBYTE) &perl_path, &plen)) {
/* We *could* check for perl510.dll, but it seems unnecessary. */
wprintf(L"found in '%s'.\n", perl_path);
More information about the Commits
mailing list