Skip to content

Commit 56aafd5

Browse files
authored
feat: merge pr #17 from Meridiano/patch-1
feat: Change BindObject call from ObjectBindPolicy to VirtualMachine
2 parents c3c7e12 + 11b300d commit 56aafd5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/RE/B/BSScriptUtil.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,11 @@ namespace RE::BSScript
502502
const auto success = [&]() {
503503
const auto game = GameVM::GetSingleton();
504504
const auto vm = game ? game->GetVM() : nullptr;
505+
const auto vmInt = Internal::VirtualMachine::GetSingleton();
505506
BSTSmartPointer<ObjectTypeInfo> typeInfo;
506507
if (!vm ||
507508
!vm->GetScriptObjectType(GetVMTypeID<T>(), typeInfo) ||
509+
!vmInt ||
508510
!typeInfo) {
509511
return false;
510512
}
@@ -522,8 +524,7 @@ namespace RE::BSScript
522524
if (!vm->FindBoundObject(handle, typeInfo->name.c_str(), false, object, false) &&
523525
vm->CreateObject(typeInfo->name, object) &&
524526
object) {
525-
auto& binding = vm->GetObjectBindPolicy();
526-
binding.BindObject(object, handle);
527+
vmInt->BindObject(object, handle, false);
527528
}
528529

529530
if (!object) {

0 commit comments

Comments
 (0)