Browse Source

!6064 Fix dataset api get nullptr of iterator when occur runtime error

Merge pull request !6064 from jiangzhiwen/fix/iter_null_ptr
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
ec9a34b3cd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/minddata/dataset/api/iterator.cc

+ 1
- 1
mindspore/ccsrc/minddata/dataset/api/iterator.cc View File

@@ -119,9 +119,9 @@ Status Iterator::BuildAndLaunchTree(std::shared_ptr<Dataset> ds) {

// Launch the execution tree.
RETURN_IF_NOT_OK(tree_->Prepare());
RETURN_IF_NOT_OK(tree_->Launch());
iterator_ = std::make_unique<DatasetIterator>(tree_);
RETURN_UNEXPECTED_IF_NULL(iterator_);
RETURN_IF_NOT_OK(tree_->Launch());

return rc;
}


Loading…
Cancel
Save