Fix unnecessary null skips

This commit is contained in:
Matt Nadareski
2025-01-13 10:57:00 -05:00
parent 94f117c06f
commit 021c4debb7

View File

@@ -1114,7 +1114,7 @@ namespace SabreTools.DatFiles
// Now we want to get the parent romof tag and put it in each of the remaining items
items = GetItemsForBucket(bucket);
string? romof = GetItemsForBucket(cloneOf)[0].GetFieldValue<Machine>(DatItem.MachineKey)!.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
string? romof = GetItemsForBucket(cloneOf!)[0].GetFieldValue<Machine>(DatItem.MachineKey)!.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
foreach (DatItem item in items)
{
item.GetFieldValue<Machine>(DatItem.MachineKey)!.SetFieldValue<string?>(Models.Metadata.Machine.RomOfKey, romof);