diff options
author | Kahrl <kahrl@gmx.net> | 2014-10-20 16:11:00 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2014-10-20 16:11:00 +0200 |
commit | ae375cc322c5ee090c21ff4a04e54ef4422020cc (patch) | |
tree | 981e0bdfeb71e71810efc5408b8863035572113c /src/nodedef.cpp | |
parent | e5652cb75cd891895fab50ce46eb34ab9734d160 (diff) | |
download | minetest-ae375cc322c5ee090c21ff4a04e54ef4422020cc.tar.gz minetest-ae375cc322c5ee090c21ff4a04e54ef4422020cc.tar.bz2 minetest-ae375cc322c5ee090c21ff4a04e54ef4422020cc.zip |
Fix memory leak caused by mesh nodes (and nodeboxes)
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r-- | src/nodedef.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 5735ef914..ee5505236 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -171,6 +171,12 @@ ContentFeatures::ContentFeatures() ContentFeatures::~ContentFeatures() { +#ifndef SERVER + for (u32 i = 0; i < 24; i++) { + if (mesh_ptr[i]) + mesh_ptr[i]->drop(); + } +#endif } void ContentFeatures::reset() |