mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:03:00 +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",
|
DPRINT("Waiting on Critical Section Event: %p %p\n",
|
||||||
CriticalSection,
|
CriticalSection,
|
||||||
CriticalSection->LockSemaphore);
|
CriticalSection->LockSemaphore);
|
||||||
CriticalSection->DebugInfo->EntryCount++;
|
|
||||||
|
if (CriticalSection->DebugInfo)
|
||||||
|
CriticalSection->DebugInfo->EntryCount++;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
||||||
/* Increase the number of times we've had contention */
|
/* Increase the number of times we've had contention */
|
||||||
CriticalSection->DebugInfo->ContentionCount++;
|
if (CriticalSection->DebugInfo)
|
||||||
|
CriticalSection->DebugInfo->ContentionCount++;
|
||||||
|
|
||||||
/* Wait on the Event */
|
/* Wait on the Event */
|
||||||
Status = NtWaitForSingleObject(CriticalSection->LockSemaphore,
|
Status = NtWaitForSingleObject(CriticalSection->LockSemaphore,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue