Skip to content

Commit

Permalink
engine: zone: don't error when trying to free NULL pointer, like stan…
Browse files Browse the repository at this point in the history
…dard C free() and C++ delete
  • Loading branch information
a1batross committed Feb 1, 2025
1 parent 7df1d4b commit 694c630
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions engine/common/zone.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ static void Mem_FreeBlock( memheader_t *mem, const char *filename, int fileline
void _Mem_Free( void *data, const char *filename, int fileline )
{
if( data == NULL )
{
Sys_Error( "%s: data == NULL (called at %s:%i)\n", __func__, filename, fileline );
return;
}

Mem_FreeBlock((memheader_t *)((byte *)data - sizeof( memheader_t )), filename, fileline );
}
Expand Down

0 comments on commit 694c630

Please sign in to comment.