mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Improve error message when Mesh:setVertexMap is used with an empty array.
This commit is contained in:
@@ -320,6 +320,9 @@ static void copyToIndexBuffer(const std::vector<uint32> &indices, void *data, si
|
||||
|
||||
void Mesh::setVertexMap(const std::vector<uint32> &map)
|
||||
{
|
||||
if (map.empty())
|
||||
throw love::Exception("Vertex map array must not be empty.");
|
||||
|
||||
size_t maxval = getVertexCount();
|
||||
|
||||
IndexDataType datatype = getIndexDataTypeFromMax(maxval);
|
||||
|
||||
Reference in New Issue
Block a user