diff --git a/src/modules/graphics/wrap_Shader.cpp b/src/modules/graphics/wrap_Shader.cpp index 5902640ea..0d5b27f5f 100644 --- a/src/modules/graphics/wrap_Shader.cpp +++ b/src/modules/graphics/wrap_Shader.cpp @@ -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 *format = shader->getBufferFormat(name); - if (name != nullptr) + if (format != nullptr) { lua_createtable(L, (int)format->size(), 0);