Skip to content

Commit

Permalink
Add error check in bc retriever
Browse files Browse the repository at this point in the history
  • Loading branch information
JDevlieghere committed May 16, 2017
1 parent 2026d2b commit 3934e79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/BitcodeRetriever.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ class BitcodeRetriever::Impl {
std::move(containers->begin(), containers->end(), std::back_inserter(bitcodeContainers));
}

// Don't forget to check error one last time, in case there were no
// children and body of the for loop was never executed.
if (err) {
return std::move(err);
}

return std::move(bitcodeContainers);
}

Expand Down

0 comments on commit 3934e79

Please sign in to comment.