summaryrefslogtreecommitdiff
path: root/drivers/vulkan
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2021-01-26 13:41:42 +0100
committerRafał Mikrut <mikrutrafal@protonmail.com>2021-01-26 13:41:42 +0100
commitb80c502c2cf98f6c4ff8876bdc64d3d3627b1c2a (patch)
tree0fe5c5216e993de85079e03c928c2efb027a4c18 /drivers/vulkan
parent268f32badaa0b8a6843f6f36c1284a41b4d7831d (diff)
Add temporary variable to not use freed memory
Diffstat (limited to 'drivers/vulkan')
-rw-r--r--drivers/vulkan/vulkan_context.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index c644395b54..c8ba65320d 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -1613,7 +1613,8 @@ void VulkanContext::set_object_name(VkObjectType p_object_type, uint64_t p_objec
name_info.pNext = nullptr;
name_info.objectType = p_object_type;
name_info.objectHandle = p_object_handle;
- name_info.pObjectName = p_object_name.utf8().get_data();
+ CharString object_name = p_object_name.utf8();
+ name_info.pObjectName = object_name.get_data();
SetDebugUtilsObjectNameEXT(device, &name_info);
}