mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 11:46:56 +02:00
remove if checks in cases where delete handles null
This commit is contained in:
parent
12996454f9
commit
f5aaad1f33
3 changed files with 9 additions and 12 deletions
|
@ -41,15 +41,12 @@ TextureCache::~TextureCache() {
|
|||
glDeleteTextures(1, &id);
|
||||
}
|
||||
if (_primaryFramebufferObject) {
|
||||
delete _primaryFramebufferObject;
|
||||
glDeleteTextures(1, &_primaryDepthTextureID);
|
||||
}
|
||||
if (_secondaryFramebufferObject) {
|
||||
delete _secondaryFramebufferObject;
|
||||
}
|
||||
if (_tertiaryFramebufferObject) {
|
||||
delete _tertiaryFramebufferObject;
|
||||
}
|
||||
|
||||
delete _primaryFramebufferObject;
|
||||
delete _secondaryFramebufferObject;
|
||||
delete _tertiaryFramebufferObject;
|
||||
}
|
||||
|
||||
GLuint TextureCache::getPermutationNormalTextureID() {
|
||||
|
|
|
@ -62,10 +62,7 @@ Node::Node(const QUuid& uuid, char type, const HifiSockAddr& publicSocket, const
|
|||
}
|
||||
|
||||
Node::~Node() {
|
||||
if (_linkedData) {
|
||||
delete _linkedData;
|
||||
}
|
||||
|
||||
delete _linkedData;
|
||||
delete _bytesReceivedMovingAverage;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,10 @@ void SvoViewer::InitializeVoxelOpt2RenderSystem()
|
|||
delete [] _readVertexStructs;
|
||||
//delete [] _readIndicesArray;
|
||||
delete [] faceCenters;
|
||||
for (int k = 0; k < NUM_CUBE_FACES; k++) if (_segmentIdxBuffers[i].idxBuff[k]) delete [] _segmentIdxBuffers[i].idxBuff[k];
|
||||
|
||||
for (int k = 0; k < NUM_CUBE_FACES; k++) {
|
||||
delete[] _segmentIdxBuffers[i].idxBuff[k];
|
||||
}
|
||||
}
|
||||
|
||||
_voxelOptRenderInitialized = true;
|
||||
|
|
Loading…
Reference in a new issue