Convert result struct only if NtUserEnumDisplaySettings returned success
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 4 Jun 2006 14:10:21 +0000 (14:10 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 4 Jun 2006 14:10:21 +0000 (14:10 +0000)
svn path=/trunk/; revision=22207

reactos/dll/win32/user32/misc/display.c

index 99a7664..b17fea9 100644 (file)
@@ -218,6 +218,8 @@ EnumDisplaySettingsExA(
  
   rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &lpDevModeW,
                                    dwFlags );
+  if (!rc)
+    goto done;
 
 #define COPYS(f,len) WideCharToMultiByte( CP_THREAD_ACP, 0, lpDevModeW.f, len, (LPSTR)lpDevMode->f, len, NULL, NULL )
 #define COPYN(f) lpDevMode->f = lpDevModeW.f