Win32: silence perl check

Sat, 08 Jun 2013 18:30:36 +0200

author
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
date
Sat, 08 Jun 2013 18:30:36 +0200
changeset 33962
d44a3e57992c
parent 33961
3bd03baab70d
child 34208
0b0ac1d83cce
child 34210
5a6598847e76

Win32: silence perl check

pidgin/win32/winpidgin.c file | annotate | diff | comparison | revisions
--- a/pidgin/win32/winpidgin.c	Sat Jun 08 18:24:00 2013 +0200
+++ b/pidgin/win32/winpidgin.c	Sat Jun 08 18:30:36 2013 +0200
@@ -74,6 +74,11 @@
 	if (retv != ERROR_SUCCESS)
 		return FALSE;
 
+	if (val_name[0] == L'\0') {
+		RegCloseKey(hkey);
+		return TRUE;
+	}
+
 	index = 0;
 	while (TRUE)
 	{
@@ -505,7 +510,8 @@
 	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);

mercurial