diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index ff3d68388f..3c4b5e8429 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -936,6 +936,10 @@ hipError_t hipStreamGetAttribute(hipStream_t stream, hipStreamAttrID attr, hipError_t hipStreamCopyAttributes(hipStream_t dst, hipStream_t src) { HIP_INIT_API(hipStreamCopyAttributes, dst, src); + if (!hip::isValid(src) || !hip::isValid(dst)) { + HIP_RETURN(hipErrorInvalidResourceHandle); + } + getStreamPerThread(src); getStreamPerThread(dst);