Fixing mismatching deallocation.

This commit is contained in:
Faerbit 2015-03-22 13:25:43 +01:00
parent 3de85042d0
commit 300f14c752
2 changed files with 2 additions and 2 deletions

View File

@ -560,7 +560,7 @@ void Graphics::render(double time)
} }
debug_ab->setDataElements(data_count/6, debugData); debug_ab->setDataElements(data_count/6, debugData);
debugDrawer.clearData(); debugDrawer.clearData();
delete debugData; delete[] debugData;
debugShader->use(); debugShader->use();
debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix); debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
debug_vao->render(); debug_vao->render();

View File

@ -97,7 +97,7 @@ SharedVertexArrayObject Terrain::makeTriangleMesh(int startX, int startZ, int en
} }
ab->setDataElements(numVertices, abData); ab->setDataElements(numVertices, abData);
delete abData; delete[] abData;
vao->bind(); vao->bind();
vao->setMode(GL_TRIANGLE_STRIP); vao->setMode(GL_TRIANGLE_STRIP);
vao->attachAllAttributes(ab); vao->attachAllAttributes(ab);