diff --git a/.pick_status.json b/.pick_status.json index c4fc59594bf..806f2e7803e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -114,7 +114,7 @@ "description": "vulkan/runtime: allow null/empty debug names", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3b361b234ac49f41a94a9bcf94fb68d5407b4b83", "notes": null diff --git a/src/vulkan/runtime/vk_debug_utils.c b/src/vulkan/runtime/vk_debug_utils.c index 2c083ab8937..556f3de1afd 100644 --- a/src/vulkan/runtime/vk_debug_utils.c +++ b/src/vulkan/runtime/vk_debug_utils.c @@ -302,10 +302,12 @@ vk_common_SetDebugUtilsObjectNameEXT( vk_free(alloc, object->object_name); object->object_name = NULL; } - object->object_name = vk_strdup(alloc, pNameInfo->pObjectName, - VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); - if (!object->object_name) - return VK_ERROR_OUT_OF_HOST_MEMORY; + if (pNameInfo->pObjectName != NULL) { + object->object_name = vk_strdup(alloc, pNameInfo->pObjectName, + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); + if (!object->object_name) + return VK_ERROR_OUT_OF_HOST_MEMORY; + } return VK_SUCCESS; }