added null check

Change-Id: I7631965286bad5684bacb7e38c63031b5c691dc0


[ROCm/hip commit: 87d1101a33]
This commit is contained in:
Sarbojit Sarkar
2020-05-20 03:50:36 -04:00
parent 7836dfd322
commit ca8de0f6c8
+3
View File
@@ -110,6 +110,9 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin
// Skip if nothing needs writing.
return hipSuccess;
}
if (dst == nullptr || src == nullptr) {
return hipErrorInvalidValue;
}
amd::Command* command = nullptr;
amd::Command::EventWaitList waitList;