mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fixed a potential null pointer dereference and a case of undefined behaviour
This commit is contained in:
@@ -147,6 +147,9 @@ int w_Mesh_getVertices(lua_State *L)
|
||||
size_t count = t->getVertexCount();
|
||||
lua_createtable(L, count, 0);
|
||||
|
||||
if (count == 0 || vertices == nullptr)
|
||||
return 1;
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
// Create vertex table.
|
||||
|
||||
Reference in New Issue
Block a user