From 53d96e8c932e922e676859aed352c999ef534214 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Thu, 23 Aug 2018 11:37:56 +0200 Subject: [PATCH] Minor addition to VmaBlockMetadata_Linear::Validate. --- src/vk_mem_alloc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index 70ce4f7..6ca170c 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -7237,6 +7237,15 @@ bool VmaBlockMetadata_Linear::Validate() const } } + if(m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount > suballocations1st.size()) + { + return false; + } + if(m_2ndNullItemsCount > suballocations2nd.size()) + { + return false; + } + VkDeviceSize sumUsedSize = 0; const size_t suballoc1stCount = suballocations1st.size(); VkDeviceSize offset = VMA_DEBUG_MARGIN;