fixed a crash in latestSDK10Version when the registry value is not found

This commit is contained in:
Damien Courtois 2018-01-18 11:37:37 +01:00
parent 7017f09263
commit 928076a13a

View File

@ -2498,7 +2498,11 @@
function m.latestSDK10Version()
local arch = iif(os.is64bit(), "\\WOW6432Node\\", "\\")
local version = os.getWindowsRegistry("HKLM:SOFTWARE" .. arch .."Microsoft\\Microsoft SDKs\\Windows\\v10.0\\ProductVersion")
return iif(version ~= nil, version .. ".0", nil)
if version ~= nil then
return version .. ".0"
else
return nil
end
end