mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
- Fix exceptions in some cases (if CriticalSection->DebugInfo = NULL)
svn path=/trunk/; revision=39891
This commit is contained in:
parent
79c11338fa
commit
64455e3b04
1 changed files with 11 additions and 4 deletions
|
@ -358,14 +358,21 @@ RtlDeleteCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
|
|||
/* Protect List */
|
||||
RtlEnterCriticalSection(&RtlCriticalSectionLock);
|
||||
|
||||
/* Remove it from the list */
|
||||
RemoveEntryList(&CriticalSection->DebugInfo->ProcessLocksList);
|
||||
if (CriticalSection->DebugInfo)
|
||||
{
|
||||
/* Remove it from the list */
|
||||
RemoveEntryList(&CriticalSection->DebugInfo->ProcessLocksList);
|
||||
RtlZeroMemory(CriticalSection->DebugInfo, sizeof(RTL_CRITICAL_SECTION_DEBUG));
|
||||
}
|
||||
|
||||
/* Unprotect */
|
||||
RtlLeaveCriticalSection(&RtlCriticalSectionLock);
|
||||
|
||||
/* Free it */
|
||||
RtlpFreeDebugInfo(CriticalSection->DebugInfo);
|
||||
if (CriticalSection->DebugInfo)
|
||||
{
|
||||
/* Free it */
|
||||
RtlpFreeDebugInfo(CriticalSection->DebugInfo);
|
||||
}
|
||||
|
||||
/* Wipe it out */
|
||||
RtlZeroMemory(CriticalSection, sizeof(RTL_CRITICAL_SECTION));
|
||||
|
|
Loading…
Reference in a new issue