diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-04 20:38:11 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-04 20:38:11 +0400 |
commit | 0c318c4a476e013ffedf7786ec77e492352d0bcb (patch) | |
tree | 00d877380b89d7d176fc302be7d32626d165f30f /intern/guardedalloc | |
parent | d710638c47491619f14495ffb130b183019782c5 (diff) |
Fix (harmless) uninitialized memory usage in BVH binning.
Fix unneeded warnings with c++ guardedalloc, delete NULL is valid.
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r-- | intern/guardedalloc/cpp/mallocn.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/guardedalloc/cpp/mallocn.cpp b/intern/guardedalloc/cpp/mallocn.cpp index 97e68d06ace..130fcb6960b 100644 --- a/intern/guardedalloc/cpp/mallocn.cpp +++ b/intern/guardedalloc/cpp/mallocn.cpp @@ -41,5 +41,7 @@ void* operator new (size_t size, const char *str) void operator delete (void *p) { - MEM_freeN(p); + /* delete NULL is valid in c++ */ + if(p) + MEM_freeN(p); } |