mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Fix Shader:getBufferFormat crashing instead of erroring when the buffer name doesn't exist in the shader.
This commit is contained in:
@@ -519,7 +519,7 @@ int w_Shader_getBufferFormat(lua_State *L)
|
||||
Shader *shader = luax_checkshader(L, 1);
|
||||
const char *name = luaL_checkstring(L, 2);
|
||||
const std::vector<Buffer::DataDeclaration> *format = shader->getBufferFormat(name);
|
||||
if (name != nullptr)
|
||||
if (format != nullptr)
|
||||
{
|
||||
lua_createtable(L, (int)format->size(), 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user