mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
- Add check on null-pointer. Fixes exception in some cases
svn path=/trunk/; revision=40555
This commit is contained in:
parent
8d8ce081fa
commit
90590ee801
1 changed files with 5 additions and 2 deletions
|
@ -117,12 +117,15 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
|
|||
DPRINT("Waiting on Critical Section Event: %p %p\n",
|
||||
CriticalSection,
|
||||
CriticalSection->LockSemaphore);
|
||||
CriticalSection->DebugInfo->EntryCount++;
|
||||
|
||||
if (CriticalSection->DebugInfo)
|
||||
CriticalSection->DebugInfo->EntryCount++;
|
||||
|
||||
for (;;) {
|
||||
|
||||
/* Increase the number of times we've had contention */
|
||||
CriticalSection->DebugInfo->ContentionCount++;
|
||||
if (CriticalSection->DebugInfo)
|
||||
CriticalSection->DebugInfo->ContentionCount++;
|
||||
|
||||
/* Wait on the Event */
|
||||
Status = NtWaitForSingleObject(CriticalSection->LockSemaphore,
|
||||
|
|
Loading…
Reference in a new issue