Merge pull request #3767 from birarda/plugs

fix a bug produced by not setting deleted var to NULL
This commit is contained in:
Brad Hefta-Gaub 2014-11-10 11:21:24 -08:00
commit 338c5aea94
2 changed files with 5 additions and 4 deletions

View file

@ -547,11 +547,12 @@ void Octree::deleteOctalCodeFromTreeRecursion(OctreeElement* element, void* extr
void Octree::eraseAllOctreeElements(bool createNewRoot) {
delete _rootElement; // this will recurse and delete all children
_rootElement = NULL;
if (createNewRoot) {
_rootElement = createNewElement();
} else {
_rootElement = NULL;
}
_isDirty = true;
}

View file

@ -79,8 +79,8 @@ public:
protected:
uint32_t _glBufferIndex : 24, /// Client only, vbo index for this voxel if being rendered, 3 bytes
_voxelSystemIndex : 8; /// Client only, index to the VoxelSystem rendering this voxel, 1 bytes
uint32_t _glBufferIndex : 24; /// Client only, vbo index for this voxel if being rendered, 3 bytes
uint32_t _voxelSystemIndex : 8; /// Client only, index to the VoxelSystem rendering this voxel, 1 bytes
// Support for _voxelSystemIndex, we use these static member variables to track the VoxelSystems that are
// in use by various voxel nodes. We map the VoxelSystem pointers into an 1 byte key, this limits us to at