We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2e3aee commit 6eaf9a3Copy full SHA for 6eaf9a3
AssetLoader/src/GLTFBuilder.cpp
@@ -249,9 +249,16 @@ void ModelBuilder::InitIndexBuffer(IRenderDevice* pDevice)
249
{
250
m_Model.IndexData.pAllocation = m_CI.pResourceManager->AllocateIndices(DataSize, 4);
251
252
- auto pBuffInitData = BufferInitData::Create();
253
- pBuffInitData->Data.emplace_back(std::move(m_IndexData));
254
- m_Model.IndexData.pAllocation->SetUserData(pBuffInitData);
+ if (m_Model.IndexData.pAllocation)
+ {
+ auto pBuffInitData = BufferInitData::Create();
255
+ pBuffInitData->Data.emplace_back(std::move(m_IndexData));
256
+ m_Model.IndexData.pAllocation->SetUserData(pBuffInitData);
257
+ }
258
+ else
259
260
+ UNEXPECTED("Failed to allocate indices from the pool.");
261
262
}
263
else
264
0 commit comments