SWDEV-345021 - add check for pointer

add check for pAllocateArray

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I6c91295c1fe4cffdf22f6b8c07fe0a592c2f4f70
This commit is contained in:
sdashmiz
2022-07-12 08:40:41 -04:00
committed by Shadi Dashmiz
parent 67aa32d697
commit 848ae2c06b
+3
View File
@@ -1009,6 +1009,9 @@ hipError_t ihipArrayCreate(hipArray** array,
hipError_t hipArrayCreate(hipArray** array,
const HIP_ARRAY_DESCRIPTOR* pAllocateArray) {
HIP_INIT_API(hipArrayCreate, array, pAllocateArray);
if (pAllocateArray == nullptr) {
return hipErrorInvalidValue;
}
CHECK_STREAM_CAPTURE_SUPPORTED();
HIP_ARRAY3D_DESCRIPTOR desc = {pAllocateArray->Width,
pAllocateArray->Height,