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:
committed by
GitHub
vanhempi
b44f5f9992
commit
199b0f1086
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user