Skip to content

Commit

Permalink
Crash Fix : Inventory crashes when recieving new inventory view
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyAmeenRizk committed Nov 12, 2024
1 parent 63a9139 commit d296f20
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ void UBeamInventorySubsystem::MergeInventoryViewIntoState(const UInventoryView*
State.FederatedId = ReceivedItemInstance.ViewPtr->ProxyId.IsSet ? ReceivedItemInstance.ViewPtr->ProxyId.Val : TEXT("");
for (const auto& Property : ReceivedItemInstance.ViewPtr->Properties) State.Properties.Add(Property->Name, Property->Value);

if (!Inventory.Items.Contains(ReceivedItemInstance.Id))
Inventory.Items.Add(ReceivedItemInstance.Id, {});

// Swap whatever exists there with the same id we just received.
auto& ItemsState = *Inventory.Items.Find(State.ContentId);
ItemsState.Remove(State);
Expand Down

0 comments on commit d296f20

Please sign in to comment.