From f8226ff54e8eb62732dc4cc33e7b40155e58fa09 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 1 Oct 2015 04:01:25 -0700 Subject: [PATCH] Align behavior of MEMPROXY_CLASS's operator delete with ::delete on nullptr --- include/MemPool.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/MemPool.h b/include/MemPool.h index 00514d86eb..e140e692de 100644 --- a/include/MemPool.h +++ b/include/MemPool.h @@ -319,7 +319,8 @@ CLASS::operator new (size_t byteCount) \ void \ CLASS::operator delete (void *address) \ { \ - Pool().freeOne(address); \ + if (address) \ + Pool().freeOne(address); \ } /// \ingroup MemPoolsAPI -- 2.47.2