void _Mem_Free(void *data, const char *filename, int fileline)
{
if (data == NULL)
- Sys_Error("Mem_Free: data == NULL (called at %s:%i)", filename, fileline);
+ {
+ Con_DPrintf("Mem_Free: data == NULL (called at %s:%i)", filename, fileline);
+ return;
+ }
if (developer.integer && developer_memorydebug.integer)
{
{
memexpandablearray_array_t *oldarrays = l->arrays;
l->maxarrays = max(l->maxarrays * 2, 128);
- l->arrays = Mem_Alloc(l->mempool, l->maxarrays * sizeof(*l->arrays));
+ l->arrays = (memexpandablearray_array_t*) Mem_Alloc(l->mempool, l->maxarrays * sizeof(*l->arrays));
if (oldarrays)
{
memcpy(l->arrays, oldarrays, l->numarrays * sizeof(*l->arrays));
}
}
l->arrays[i].numflaggedrecords = 0;
- l->arrays[i].data = Mem_Alloc(l->mempool, (l->recordsize + 1) * l->numrecordsperarray);
+ l->arrays[i].data = (unsigned char *) Mem_Alloc(l->mempool, (l->recordsize + 1) * l->numrecordsperarray);
l->arrays[i].allocflags = l->arrays[i].data + l->recordsize * l->numrecordsperarray;
l->numarrays++;
}