diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index 72af505a41..233db0b05f 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -237,7 +237,9 @@ hipStream_t stream_per_thread::get() { } void stream_per_thread::clear_spt() { - m_streams[getCurrentDevice()->deviceId()] = nullptr; + if (!m_streams.empty()) { + m_streams[getCurrentDevice()->deviceId()] = nullptr; + } }