Changeset - r20843:c8f840f49d7c
[Not reviewed]
master
0 1 0
fonsinchen - 11 years ago 2013-10-20 13:35:35
fonsinchen@openttd.org
(svn r25887) -Fix: Ignore NULL pointers in delete operator of PoolItem.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/core/pool_type.hpp
Show inline comments
 
@@ -158,12 +158,13 @@ struct Pool : PoolBase {
 
		 * Marks Titem as free. Its memory is released
 
		 * @param p memory to free
 
		 * @note the item has to be allocated in the pool!
 
		 */
 
		inline void operator delete(void *p)
 
		{
 
			if (p == NULL) return;
 
			Titem *pn = (Titem *)p;
 
			assert(pn == Tpool->Get(pn->index));
 
			Tpool->FreeItem(pn->index);
 
		}
 

	
 
		/**
0 comments (0 inline, 0 general)