two possible crash fixes

This commit is contained in:
ZappoMan 2013-10-08 09:56:47 -07:00
parent aa80ec3497
commit 89a4ea6470

View file

@ -908,6 +908,10 @@ int VoxelSystem::updateNodeInArraysAsFullVBO(VoxelNode* node) {
// will forcibly remove it from the VBOs because we know better!!!
int VoxelSystem::forceRemoveNodeFromArraysAsPartialVBO(VoxelNode* node) {
if (!_initialized) {
return 0;
}
// if the node is not in the VBOs then we have nothing to do!
if (node->isKnownBufferIndex()) {
@ -937,6 +941,10 @@ int VoxelSystem::updateNodeInArraysAsPartialVBO(VoxelNode* node) {
if (_voxelsInWriteArrays >= _maxVoxels) {
return 0;
}
if (!_initialized) {
return 0;
}
// Now, if we've changed any attributes (our renderness, our color, etc) then update the Arrays...
if (node->isDirty()) {