support free(NULL), which is valid ANSI C

This commit is contained in:
Hisham Muhammad 2006-04-10 20:39:14 +00:00
parent 86d6313560
commit 34bcf8050e
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ void DebugMemory_registerAllocation(void* data, char* file, int line) {
}
void DebugMemory_registerDeallocation(void* data, char* file, int line) {
if (!data)
return;
assert(singleton);
assert(singleton->first);
DebugMemoryItem* walk = singleton->first;