From 993b9f790cb09de586965f934796988029e3cc7e Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 17 Mar 2022 19:56:16 +0000 Subject: [PATCH] SWDEV-314982 - hipStreamGetCaptureInfo seq ID ptr check Change-Id: I84a84121d2064182f0daea22578f0fa5f94f850c [ROCm/clr commit: 8c103bb8987e4da5840b75b1ba5d48880ac247c0] --- projects/clr/hipamd/src/hip_graph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index 9a0fc62d74..1a8181a9e2 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -1261,8 +1261,8 @@ hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* p } hip::Stream* s = reinterpret_cast(stream); *pCaptureStatus = s->GetCaptureStatus(); - if (*pCaptureStatus == hipStreamCaptureStatusActive) { - pId = reinterpret_cast(s->GetCaptureID()); + if (*pCaptureStatus == hipStreamCaptureStatusActive && pId != nullptr) { + *pId = s->GetCaptureID(); } HIP_RETURN(hipSuccess); }