History

two possible crash fixes

ZappoMan committed 13 years ago

Commit 89a4ea61 parent aa80ec31 file · +8 −0Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+8−0
@@ -908,6 +908,10 @@ int VoxelSystem::updateNodeInArraysAsFullVBO(VoxelNode* node) { · 907 unmodified lines
908// will forcibly remove it from the VBOs because we know better!!!908// will forcibly remove it from the VBOs because we know better!!!
909int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {909int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
910 910
911 if (!_initialized) {
912 return 0;
913 }
914
911 // if the node is not in the VBOs then we have nothing to do!915 // if the node is not in the VBOs then we have nothing to do!
912 if (node->isKnownBufferIndex()) {916 if (node->isKnownBufferIndex()) {
913 917
@@ -937,6 +941,10 @@ int VoxelSystem::updateNodeInArraysAsPartialVBO(VoxelNode* node) { · 23 unmodified lines
937 if (_voxelsInWriteArrays >= _maxVoxels) {941 if (_voxelsInWriteArrays >= _maxVoxels) {
938 return 0;942 return 0;
939 }943 }
944
945 if (!_initialized) {
946 return 0;
947 }
940 948
941 // Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...949 // Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
942 if (node->isDirty()) {950 if (node->isDirty()) {