From 692ccba14d18ecdb5dba9605bcdf676a61fbd725 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Thu, 25 Jul 2019 17:14:02 +0200 Subject: [PATCH] Initialize structure VmaAllocator_T::m_VulkanFunctions to zeros in constructor to avoid garbage pointers Fixes #73 --- src/vk_mem_alloc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index 0af5d13..eece8da 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -14168,6 +14168,7 @@ VmaAllocator_T::VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo) : memset(&m_pBlockVectors, 0, sizeof(m_pBlockVectors)); memset(&m_pDedicatedAllocations, 0, sizeof(m_pDedicatedAllocations)); + memset(&m_VulkanFunctions, 0, sizeof(m_VulkanFunctions)); for(uint32_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i) {