Skip to content

Commit

Permalink
Improve error message when Mesh:setVertexMap is used with an empty ar…
Browse files Browse the repository at this point in the history
…ray.
  • Loading branch information
slime73 committed Sep 30, 2023
1 parent 2fd2930 commit 691d910
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/graphics/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 691d910

Please sign in to comment.