Fix crash when "coherent maps" try to erase end()

* This happened because a memory handle was not currently mapped.
This commit is contained in:
Graham Wihlidal
2017-03-18 04:42:08 +01:00
committed by baldurk
parent 4936c6cd67
commit e71614d58e
@@ -644,8 +644,8 @@ void WrappedVulkan::vkUnmapMemory(VkDevice device, VkDeviceMemory mem)
auto it = std::find(m_CoherentMaps.begin(), m_CoherentMaps.end(), memrecord);
if(it == m_CoherentMaps.end())
RDCERR("vkUnmapMemory for memory handle that's not currently mapped");
m_CoherentMaps.erase(it);
else
m_CoherentMaps.erase(it);
}
}