Fix NtQueryPerformanceCounter parameter checking. Spotted by Alex

Woods.
This commit is contained in:
Juan Lang 2005-02-21 18:27:58 +00:00 committed by Alexandre Julliard
parent 4390d003f4
commit 9ebbd3e514
1 changed files with 4 additions and 1 deletions

View File

@ -520,9 +520,12 @@ NTSTATUS WINAPI NtQueryPerformanceCounter(
OUT PLARGE_INTEGER Frequency)
{
LARGE_INTEGER time;
if (!Counter) return STATUS_ACCESS_VIOLATION;
NtQuerySystemTime( &time );
Counter->QuadPart = time.QuadPart;
Frequency->QuadPart = 10000000;
if (Frequency)
Frequency->QuadPart = 10000000;
return 0;
}