Skip to content

Commit 5a53a19

Browse files
Merge pull request #454 from crud89/master
Fix ineffective error code checks.
2 parents 05973d8 + 63480d6 commit 5a53a19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/vk_mem_alloc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16404,7 +16404,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
1640416404
pImageCreateInfo,
1640516405
allocator->GetAllocationCallbacks(),
1640616406
pImage);
16407-
if(res >= 0)
16407+
if(res == VK_SUCCESS)
1640816408
{
1640916409
VmaSuballocationType suballocType = pImageCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL ?
1641016410
VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL :
@@ -16429,14 +16429,14 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
1642916429
1, // allocationCount
1643016430
pAllocation);
1643116431

16432-
if(res >= 0)
16432+
if(res == VK_SUCCESS)
1643316433
{
1643416434
// 3. Bind image with memory.
1643516435
if((pAllocationCreateInfo->flags & VMA_ALLOCATION_CREATE_DONT_BIND_BIT) == 0)
1643616436
{
1643716437
res = allocator->BindImageMemory(*pAllocation, 0, *pImage, VMA_NULL);
1643816438
}
16439-
if(res >= 0)
16439+
if(res == VK_SUCCESS)
1644016440
{
1644116441
// All steps succeeded.
1644216442
#if VMA_STATS_STRING_ENABLED

0 commit comments

Comments
 (0)