@@ -108,7 +108,6 @@ extern void printError(const char* format, ...);
// Object deletion macro
#define SAFE_DELETE(x) \
- if (x) \
{ \
delete x; \
x = NULL; \
@@ -116,7 +115,6 @@ extern void printError(const char* format, ...);
// Array deletion macro
#define SAFE_DELETE_ARRAY(x) \
delete[] x; \
@@ -109,7 +109,8 @@ void* debugAlloc(std::size_t size, const char* file, int line)
void debugFree(void* p)
{
- assert(p);
+ if (p == 0)
+ return;
// Backup passed in pointer to access memory allocation record
void* mem = ((unsigned char*)p) - sizeof(MemoryAllocationRecord);