Prevent crash when trying to release buffer from already destroyed memory pool

This commit is contained in:
Georg Hagen
2024-08-21 15:45:46 +02:00
parent 6f19758beb
commit 35515c7902
5 changed files with 7 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ namespace OpenVulkano::Vulkan
{
if (memPool->FreeBuffer(buffer)) return;
}
Logger::RENDER->error("Attempted to released buffer to pool, but owning pool no longer exists!");
buffer->allocation = nullptr; // Allocation is no longer valid since owning pool is gone already
delete buffer;
}