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.
This commit is contained in:
Haehnle, Nicolai
2025-04-10 11:40:05 -07:00
committed by GitHub
vanhempi b44f5f9992
commit 199b0f1086
+1
Näytä tiedosto
@@ -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;
}
}
}