| Index: sandbox/win/tests/validation_tests/commands.cc
|
| diff --git a/sandbox/win/tests/validation_tests/commands.cc b/sandbox/win/tests/validation_tests/commands.cc
|
| index 26133477267b865561332478a07ef8da0528d0df..45717b472db283b9f2344a396bc76dd4a0447e20 100644
|
| --- a/sandbox/win/tests/validation_tests/commands.cc
|
| +++ b/sandbox/win/tests/validation_tests/commands.cc
|
| @@ -276,8 +276,8 @@ int TestOpenAlternateDesktop(wchar_t *desktop_name) {
|
| }
|
|
|
| // Open by name with WRITE_DAC.
|
| - if ((desktop = ::OpenDesktop(desktop_name, 0, FALSE, WRITE_DAC)) ||
|
| - ::GetLastError() != ERROR_ACCESS_DENIED) {
|
| + desktop = ::OpenDesktop(desktop_name, 0, FALSE, WRITE_DAC);
|
| + if (desktop || ::GetLastError() != ERROR_ACCESS_DENIED) {
|
| ::CloseDesktop(desktop);
|
| return SBOX_TEST_SUCCEEDED;
|
| }
|
|
|