aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2014-10-20 16:11:00 +0200
committerKahrl <kahrl@gmx.net>2014-10-20 16:11:00 +0200
commitae375cc322c5ee090c21ff4a04e54ef4422020cc (patch)
tree981e0bdfeb71e71810efc5408b8863035572113c /src/nodedef.cpp
parente5652cb75cd891895fab50ce46eb34ab9734d160 (diff)
downloadminetest-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.cpp6
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()