mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 14:16:50 +00:00
Add nullptr check for kv delete operator
This commit is contained in:
parent
2dd20478e4
commit
d2f945c87f
@ -2806,12 +2806,18 @@ void *KeyValues::operator new( size_t iAllocSize, int nBlockUse, const char *pFi
|
||||
//-----------------------------------------------------------------------------
|
||||
void KeyValues::operator delete( void *pMem )
|
||||
{
|
||||
KeyValuesSystem()->FreeKeyValuesMemory(pMem);
|
||||
if (pMem)
|
||||
{
|
||||
KeyValuesSystem()->FreeKeyValuesMemory(pMem);
|
||||
}
|
||||
}
|
||||
|
||||
void KeyValues::operator delete( void *pMem, int nBlockUse, const char *pFileName, int nLine )
|
||||
{
|
||||
KeyValuesSystem()->FreeKeyValuesMemory(pMem);
|
||||
if (pMem)
|
||||
{
|
||||
KeyValuesSystem()->FreeKeyValuesMemory(pMem);
|
||||
}
|
||||
}
|
||||
|
||||
void KeyValues::UnpackIntoStructure( KeyValuesUnpackStructure const *pUnpackTable, void *pDest, size_t DestSizeInBytes )
|
||||
|
Loading…
Reference in New Issue
Block a user