fix: imaginite on racing minigames and add null checks (#1958)

This commit is contained in:
David Markowitz
2026-02-23 01:16:36 -08:00
committed by GitHub
parent 3c64b26c39
commit 434c9b6315
4 changed files with 8 additions and 6 deletions

View File

@@ -325,9 +325,8 @@ bool ActivityComponent::CheckCost(Entity* player) const {
}
bool ActivityComponent::TakeCost(Entity* player) const {
auto* inventoryComponent = player->GetComponent<InventoryComponent>();
return CheckCost(player) && inventoryComponent->RemoveItem(m_ActivityInfo.optionalCostLOT, m_ActivityInfo.optionalCostCount, eInventoryType::ALL);
return CheckCost(player) && inventoryComponent && inventoryComponent->RemoveItem(m_ActivityInfo.optionalCostLOT, m_ActivityInfo.optionalCostCount, eInventoryType::ALL);
}
void ActivityComponent::PlayerReady(Entity* player, bool bReady) {