diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-10-20 13:35:35 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-10-20 13:35:35 +0000 |
commit | e21ae348786106a82b95adfafa5c8061dfb5242f (patch) | |
tree | 85de742e9f7fd58f064cd755cab36590e5af752f | |
parent | a840efe7a0439013ca61326c80b2ecee4b7cb68c (diff) | |
download | openttd-e21ae348786106a82b95adfafa5c8061dfb5242f.tar.xz |
(svn r25887) -Fix: Ignore NULL pointers in delete operator of PoolItem.
-rw-r--r-- | src/core/pool_type.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp index c703b7cdc..74ade5790 100644 --- a/src/core/pool_type.hpp +++ b/src/core/pool_type.hpp @@ -161,6 +161,7 @@ struct Pool : PoolBase { */ inline void operator delete(void *p) { + if (p == NULL) return; Titem *pn = (Titem *)p; assert(pn == Tpool->Get(pn->index)); Tpool->FreeItem(pn->index); |