diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index e70bf270a59..93da87e59ae 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -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; }