Author: dchapyshev
Date: Fri Apr 17 11:12:21 2009
New Revision: 40555
URL:
http://svn.reactos.org/svn/reactos?rev=40555&view=rev
Log:
- Add check on null-pointer. Fixes exception in some cases
Modified:
trunk/reactos/lib/rtl/critical.c
Modified: trunk/reactos/lib/rtl/critical.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/critical.c?rev=405…
==============================================================================
--- trunk/reactos/lib/rtl/critical.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/critical.c [iso-8859-1] Fri Apr 17 11:12:21 2009
@@ -117,12 +117,15 @@
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,