mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +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 */
|
/* Protect List */
|
||||||
RtlEnterCriticalSection(&RtlCriticalSectionLock);
|
RtlEnterCriticalSection(&RtlCriticalSectionLock);
|
||||||
|
|
||||||
/* Remove it from the list */
|
if (CriticalSection->DebugInfo)
|
||||||
RemoveEntryList(&CriticalSection->DebugInfo->ProcessLocksList);
|
{
|
||||||
|
/* Remove it from the list */
|
||||||
|
RemoveEntryList(&CriticalSection->DebugInfo->ProcessLocksList);
|
||||||
|
RtlZeroMemory(CriticalSection->DebugInfo, sizeof(RTL_CRITICAL_SECTION_DEBUG));
|
||||||
|
}
|
||||||
|
|
||||||
/* Unprotect */
|
/* Unprotect */
|
||||||
RtlLeaveCriticalSection(&RtlCriticalSectionLock);
|
RtlLeaveCriticalSection(&RtlCriticalSectionLock);
|
||||||
|
|
||||||
/* Free it */
|
if (CriticalSection->DebugInfo)
|
||||||
RtlpFreeDebugInfo(CriticalSection->DebugInfo);
|
{
|
||||||
|
/* Free it */
|
||||||
|
RtlpFreeDebugInfo(CriticalSection->DebugInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/* Wipe it out */
|
/* Wipe it out */
|
||||||
RtlZeroMemory(CriticalSection, sizeof(RTL_CRITICAL_SECTION));
|
RtlZeroMemory(CriticalSection, sizeof(RTL_CRITICAL_SECTION));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue