mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-06-08 03:13:52 +00:00
Metal: Guard against null vertexAttributes for shaders with no inputs. (#3719)
This commit is contained in:
committed by
GitHub
parent
ba17ab3825
commit
ccd0d04c9e
@@ -3233,7 +3233,7 @@ static_assert(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNames
|
||||
{
|
||||
NS::Array* vertexAttribs = _vsh->m_function->vertexAttributes();
|
||||
|
||||
for (NS::UInteger ai = 0, ac = vertexAttribs->count(); ai < ac; ++ai)
|
||||
for (NS::UInteger ai = 0, ac = NULL != vertexAttribs ? vertexAttribs->count() : 0; ai < ac; ++ai)
|
||||
{
|
||||
MTL::VertexAttribute* attrib = (MTL::VertexAttribute*)vertexAttribs->object(ai);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user