vkd3d: Avoid division by zero in GetResourceAllocationInfo() (Coverity).

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-10-29 11:12:13 +01:00 committed by Alexandre Julliard
parent 090177b95f
commit a08dadde32

View File

@ -2072,7 +2072,7 @@ static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResour
}
}
if (desc->Alignment % info->Alignment)
if (valid && desc->Alignment % info->Alignment)
{
WARN("Invalid resource alignment %#"PRIx64" (required %#"PRIx64").\n",
desc->Alignment, info->Alignment);