aboutsummaryrefslogtreecommitdiff
path: root/src/client/mapblock_mesh.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-12-23 22:03:49 +0100
committersfan5 <sfan5@live.de>2020-12-24 13:44:54 +0100
commit74762470b2aa11a5271b846549ff14b86c1705d2 (patch)
treecf4fd29ba05a94395674ac6cd5b2eeb7bdac0ee1 /src/client/mapblock_mesh.cpp
parent289425f6bd6cfe1f66218918d9d5bd1b9f89aa7c (diff)
downloadminetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.gz
minetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.bz2
minetest-74762470b2aa11a5271b846549ff14b86c1705d2.zip
Fix some minor code issues all over the place
Diffstat (limited to 'src/client/mapblock_mesh.cpp')
-rw-r--r--src/client/mapblock_mesh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index dac25a066..4c43fcb61 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -1201,13 +1201,13 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
MapBlockMesh::~MapBlockMesh()
{
for (scene::IMesh *m : m_mesh) {
- if (m_enable_vbo && m)
+ if (m_enable_vbo) {
for (u32 i = 0; i < m->getMeshBufferCount(); i++) {
scene::IMeshBuffer *buf = m->getMeshBuffer(i);
RenderingEngine::get_video_driver()->removeHardwareBuffer(buf);
}
+ }
m->drop();
- m = NULL;
}
delete m_minimap_mapblock;
}