Fixed mismatched new[]/delete in 3D viewer

This commit is contained in:
Maciej Suminski 2017-03-08 09:12:16 +01:00
parent cf373e543f
commit 14cbdcec1f
2 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,7 @@ C3D_RENDER_RAYTRACING::~C3D_RENDER_RAYTRACING()
delete m_outlineBoard2dObjects;
m_outlineBoard2dObjects = NULL;
delete m_shaderBuffer;
delete[] m_shaderBuffer;
m_shaderBuffer = NULL;
opengl_delete_pbo();
@ -2132,7 +2132,7 @@ void C3D_RENDER_RAYTRACING::initialize_block_positions()
}
// Create m_shader buffer
delete m_shaderBuffer;
delete[] m_shaderBuffer;
m_shaderBuffer = new SFVEC3F[m_realBufferSize.x * m_realBufferSize.y];
opengl_init_pbo();

View File

@ -109,11 +109,11 @@ void CPOSTSHADER::SetPixelData( unsigned int x,
void CPOSTSHADER::destroy_buffers()
{
delete m_normals; m_normals = 0;
delete m_color; m_color = 0;
delete m_depth; m_depth = 0;
delete m_shadow_att_factor; m_shadow_att_factor = 0;
delete m_wc_hitposition; m_wc_hitposition = 0;
delete[] m_normals; m_normals = nullptr;
delete[] m_color; m_color = nullptr;
delete[] m_depth; m_depth = nullptr;
delete[] m_shadow_att_factor; m_shadow_att_factor = nullptr;
delete[] m_wc_hitposition; m_wc_hitposition = nullptr;
}