Report null stream creation failure (#152)

Explicitly nulling the pointer causes us to report the error below
instead of keeping a dangling pointer around that will most likely lead
to a subsequent segfault.

[ROCm/clr commit: 199b0f1086]
此提交包含在:
Haehnle, Nicolai
2025-04-10 11:40:05 -07:00
提交者 GitHub
父節點 2a39c6a782
當前提交 b3d1ac7232
+1
查看文件
@@ -39,6 +39,7 @@ hip::Stream* Device::NullStream(bool wait) {
// Stream creation might be failed from rcor and in that case, vdev is null.
if (null_stream_->vdev() == nullptr) {
Stream::Destroy(null_stream_);
null_stream_ = nullptr;
}
}
}