diff --git a/src/modules/graphics/Mesh.cpp b/src/modules/graphics/Mesh.cpp index 78abd2d96..4db8cf316 100644 --- a/src/modules/graphics/Mesh.cpp +++ b/src/modules/graphics/Mesh.cpp @@ -320,6 +320,9 @@ static void copyToIndexBuffer(const std::vector &indices, void *data, si void Mesh::setVertexMap(const std::vector &map) { + if (map.empty()) + throw love::Exception("Vertex map array must not be empty."); + size_t maxval = getVertexCount(); IndexDataType datatype = getIndexDataTypeFromMax(maxval);