Check if .upd is not null when sorting (Fixes: #715)

This commit is contained in:
Archangel
2025-12-26 11:50:25 +01:00
parent 0f07ea8622
commit 0b7bea4961
@@ -363,7 +363,10 @@ public class PaymentService(
var itemsInStashCache = GetItemInStashCache(pmcData.Inventory.Items, playerStashId); var itemsInStashCache = GetItemInStashCache(pmcData.Inventory.Items, playerStashId);
// Filter out 'Locked' money stacks as they cannot be used // Filter out 'Locked' money stacks as they cannot be used
var noLocked = moneyItemsInInventory.Where(moneyItem => moneyItem.Upd.PinLockState != PinLockState.Locked); var noLocked = moneyItemsInInventory.Where(moneyItem =>
moneyItem.Upd is not null && moneyItem.Upd.PinLockState != PinLockState.Locked
);
if (noLocked.Any()) if (noLocked.Any())
{ {
// We found unlocked money // We found unlocked money