History

make addChildAtIndex() use createNewElement() so we get our correct classes

ZappoMan committed 12 years ago

Commit 4e18eaa1 parent d7ae0231 file · +3 −3Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/VoxelSystem.cpp+3−3
@@ -256,14 +256,14 @@ void VoxelSystem::clearFreeBufferIndexes() { · 255 unmodified lines
256256 }
257257
258258 VoxelSystem::~VoxelSystem() {
259+ VoxelTreeElement::removeDeleteHook(this);
260+ VoxelTreeElement::removeUpdateHook(this);
261+
259262 cleanupVoxelMemory();
260263 delete _tree;
261264 pthread_mutex_destroy(&_bufferWriteLock);
262265 pthread_mutex_destroy(&_treeLock);
263266 pthread_mutex_destroy(&_freeIndexLock);
264−
265− VoxelTreeElement::removeDeleteHook(this);
266− VoxelTreeElement::removeUpdateHook(this);
267267 }
268268
269269 void VoxelSystem::setMaxVoxels(int maxVoxels) {