1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2026-10-10 11:53:05 +08:00

Fix SDK issues with NO_MALLOC_OVERRIDE (bug 5521).

This commit is contained in:
Nicholas Hastings
2012-10-26 14:45:40 -04:00
parent 3a36e4b850
commit 38003f0586
4 changed files with 17 additions and 5 deletions
+4
View File
@@ -2348,9 +2348,13 @@ void *KeyValues::operator new( size_t iAllocSize )
void *KeyValues::operator new( size_t iAllocSize, int nBlockUse, const char *pFileName, int nLine )
{
#ifndef NO_MALLOC_OVERRIDE
MemAlloc_PushAllocDbgInfo( pFileName, nLine );
#endif
void *p = KeyValuesSystem()->AllocKeyValuesMemory(iAllocSize);
#ifndef NO_MALLOC_OVERRIDE
MemAlloc_PopAllocDbgInfo();
#endif
return p;
}