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