Fix Complete Overhaul (#934)

Check your pointers :)
This commit is contained in:
David Markowitz
2022-12-31 11:44:09 -08:00
committed by GitHub
parent 737eaba54d
commit 09157506bf
2 changed files with 22 additions and 2 deletions

View File

@@ -347,6 +347,15 @@ void Item::Disassemble(const eInventoryType inventoryType) {
if (data->GetKey() == u"assemblyPartLOTs") {
auto modStr = data->GetValueAsString();
// This shouldn't be null but always check your pointers.
if (GetInventory()) {
auto inventoryComponent = GetInventory()->GetComponent();
if (inventoryComponent) {
auto entity = inventoryComponent->GetParent();
if (entity) entity->SetVar<std::string>(u"currentModifiedBuild", modStr);
}
}
std::vector<LOT> modArray;
std::stringstream ssData(modStr);