diff --git a/game/graphics.cc b/game/graphics.cc index 6fb923e..b8654a6 100644 --- a/game/graphics.cc +++ b/game/graphics.cc @@ -560,7 +560,7 @@ void Graphics::render(double time) } debug_ab->setDataElements(data_count/6, debugData); debugDrawer.clearData(); - delete debugData; + delete[] debugData; debugShader->use(); debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix); debug_vao->render(); diff --git a/game/terrain.cc b/game/terrain.cc index 79e5831..3987eaa 100644 --- a/game/terrain.cc +++ b/game/terrain.cc @@ -97,7 +97,7 @@ SharedVertexArrayObject Terrain::makeTriangleMesh(int startX, int startZ, int en } ab->setDataElements(numVertices, abData); - delete abData; + delete[] abData; vao->bind(); vao->setMode(GL_TRIANGLE_STRIP); vao->attachAllAttributes(ab);