From 0a2d733c390feebe7d96d5dde08ad6e19e2597bc Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Fri, 5 May 2023 23:59:09 +0200 Subject: [PATCH] Fix unique_ptr new[]/delete mismatch This is likely a crash fix --- libraries/graphics/src/graphics/Geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/graphics/src/graphics/Geometry.cpp b/libraries/graphics/src/graphics/Geometry.cpp index bc89dbfc3d..0fb2a0eb51 100644 --- a/libraries/graphics/src/graphics/Geometry.cpp +++ b/libraries/graphics/src/graphics/Geometry.cpp @@ -160,7 +160,7 @@ graphics::MeshPointer Mesh::map(std::function vertexFunc, gpu::BufferView::Index numVertices = (gpu::BufferView::Index)getNumVertices(); gpu::Resource::Size vertexSize = numVertices * sizeof(glm::vec3); - std::unique_ptr resultVertexData{ new unsigned char[vertexSize] }; + std::unique_ptr resultVertexData{ new unsigned char[vertexSize] }; unsigned char* vertexDataCursor = resultVertexData.get(); for (gpu::BufferView::Index i = 0; i < numVertices; i++) {