[ModelSurfs] Skip releasing if buffer is empty
This commit is contained in:
parent
4a4e938b00
commit
3cadc64d13
@ -189,6 +189,8 @@ namespace Components
|
||||
{
|
||||
hasCustomSurface = true;
|
||||
|
||||
if (!ModelSurfs::BufferMap.empty())
|
||||
{
|
||||
auto buffer = ModelSurfs::BufferMap.find(surface->triIndices);
|
||||
if (buffer != ModelSurfs::BufferMap.end())
|
||||
{
|
||||
@ -204,8 +206,9 @@ namespace Components
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasCustomSurface)
|
||||
if (hasCustomSurface && !ModelSurfs::AllocMap.empty())
|
||||
{
|
||||
auto allocData = ModelSurfs::AllocMap.find(header.surfaces->name);
|
||||
if (allocData != ModelSurfs::AllocMap.end())
|
||||
|
Loading…
Reference in New Issue
Block a user