Error checking [skip CI]
This commit is contained in:
parent
beab768ffd
commit
d26fb8831e
1 changed files with 3 additions and 2 deletions
|
|
@ -107,7 +107,7 @@ namespace vks
|
|||
};
|
||||
|
||||
struct Model {
|
||||
VkDevice device;
|
||||
VkDevice device = nullptr;
|
||||
vk::Buffer vertices;
|
||||
vk::Buffer indices;
|
||||
uint32_t indexCount = 0;
|
||||
|
|
@ -134,6 +134,7 @@ namespace vks
|
|||
/** @brief Release all Vulkan resources of this model */
|
||||
void destroy()
|
||||
{
|
||||
assert(device);
|
||||
vkDestroyBuffer(device, vertices.buffer, nullptr);
|
||||
vkFreeMemory(device, vertices.memory, nullptr);
|
||||
if (indices.buffer != VK_NULL_HANDLE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue