forked from 0ad/0ad
allow freeing 0 ptrs
This was SVN commit r999.
This commit is contained in:
parent
788b177e81
commit
caedad6fc4
@ -249,6 +249,9 @@ int mem_free_h(Handle& hm)
|
||||
|
||||
int mem_free_p(void*& p)
|
||||
{
|
||||
if(!p)
|
||||
return 0;
|
||||
|
||||
Handle hm = find_alloc(p);
|
||||
p = 0;
|
||||
if(hm <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user