Skip to content

Commit

Permalink
vmtester: do not crash if create_vm returns nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Apr 23, 2019
1 parent 844a127 commit d825070
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/vmtester/vmtester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ evmc_create_fn create_fn;
std::unique_ptr<evmc_instance, evmc_destroy_fn> create_vm()
{
auto vm = create_fn();
if (vm == nullptr)
return {nullptr, nullptr};
return {vm, vm->destroy};
}
} // namespace
Expand Down

0 comments on commit d825070

Please sign in to comment.