Browse Source

Merge pull request #25066 from lixiaobing10051267/masterErr

Add checking err for IsWindowsClient()
Sebastiaan van Stijn 9 years ago
parent
commit
4554e60651
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/system/syscall_windows.go

+ 1 - 1
pkg/system/syscall_windows.go

@@ -56,7 +56,7 @@ func GetOSVersion() OSVersion {
 func IsWindowsClient() bool {
 	osviex := &osVersionInfoEx{OSVersionInfoSize: 284}
 	r1, _, err := procGetVersionExW.Call(uintptr(unsafe.Pointer(osviex)))
-	if r1 == 0 {
+	if err != nil || r1 == 0 {
 		logrus.Warnf("GetVersionExW failed - assuming server SKU: %v", err)
 		return false
 	}