Diff

net/dns.lua @ 3544:f2aca3e0fe3b

net.dns: Fixed a traceback when util/windows.dll is unavailable on windows.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 22 Oct 2010 10:45:45 +0500
parent 3540:bc139431830b
child 3719:0f87632b87e9
line wrap: on
line diff
--- a/net/dns.lua	Fri Oct 22 06:33:30 2010 +0100
+++ b/net/dns.lua	Fri Oct 22 10:45:45 2010 +0500
@@ -531,7 +531,7 @@
 
 function resolver:adddefaultnameservers()    -- - - - -  adddefaultnameservers
 	if is_windows then
-		if windows then
+		if windows and windows.get_nameservers then
 			for _, server in ipairs(windows.get_nameservers()) do
 				self:addnameserver(server);
 			end