diff --git a/libraries/chain/webassembly/privileged.cpp b/libraries/chain/webassembly/privileged.cpp index f9a8456745..c7be046bab 100644 --- a/libraries/chain/webassembly/privileged.cpp +++ b/libraries/chain/webassembly/privileged.cpp @@ -213,7 +213,8 @@ namespace eosio { namespace chain { namespace webassembly { } bool interface::is_privileged( account_name n ) const { - return context.db.get( n ).is_privileged(); + auto const*account_metadata = context.db.find( n ); + return account_metadata != nullptr && account_metadata->is_privileged(); } void interface::set_privileged( account_name n, bool is_priv ) { diff --git a/libraries/chain/webassembly/runtimes/eos-vm.cpp b/libraries/chain/webassembly/runtimes/eos-vm.cpp index 3a41448c19..025cb19515 100644 --- a/libraries/chain/webassembly/runtimes/eos-vm.cpp +++ b/libraries/chain/webassembly/runtimes/eos-vm.cpp @@ -218,7 +218,8 @@ class eos_vm_profiling_module : public wasm_instantiated_module_interface { if(auto it = _prof.find(account); it != _prof.end()) { return it->second.get(); } else { - auto code_sequence = context.control.db().get(account).code_sequence; + auto const *account_metadata = context.control.db().find(account); + auto code_sequence = account_metadata != nullptr ? account_metadata->code_sequence : 0; std::string basename = account.to_string() + "." + std::to_string(code_sequence); auto prof = std::make_unique(basename + ".profile", *_instantiated_module); auto [pos,_] = _prof.insert(std::pair{ account, std::move(prof)});