forked from AuroraMiddleware/gtk
Plug a memory leak
A function with ensure in the name would better check if the thing it is supposed to ensure already exists.
This commit is contained in:
parent
00f8a11aec
commit
b5ac277654
@ -299,7 +299,8 @@ static void
|
||||
gsk_vulkan_image_ensure_view (GskVulkanImage *self,
|
||||
VkFormat format)
|
||||
{
|
||||
GSK_VK_CHECK (vkCreateImageView, gdk_vulkan_context_get_device (self->vulkan),
|
||||
if (self->vk_image_view == VK_NULL_HANDLE)
|
||||
GSK_VK_CHECK (vkCreateImageView, gdk_vulkan_context_get_device (self->vulkan),
|
||||
&(VkImageViewCreateInfo) {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
||||
.image = self->vk_image,
|
||||
|
Loading…
Reference in New Issue
Block a user