Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Pospelove committed Jan 30, 2025
1 parent b68ec67 commit a739cde
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions papyrus-vm/src/papyrus-vm-lib/ActivePexInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,24 @@ void ActivePexInstance::ExecuteOpCode(
spdlog::trace("propget do nothing: prop {} not found",
propertyName);
} else {
VarValue* var = inst->variables->GetVariableByName(
it->autoVarName.data(), *inst->sourcePex.fn());

VarValue* var;

try {
var = inst->variables->GetVariableByName(
it->autoVarName.data(), *inst->sourcePex.fn());

} catch (std::exception& e) {
spdlog::error("OpcodesImplementation::Opcodes::op_PropGet - "
"GetVariableByName errored with '{}'",
e.what());
var = nullptr;
} catch (...) {
spdlog::error("OpcodesImplementation::Opcodes::op_PropGet - "
"GetVariableByName errored with unknown error");
var = nullptr;
}

if (var) {
*args[2] = *var;
} else {
Expand Down

0 comments on commit a739cde

Please sign in to comment.