From 2cbc6ad372f3b2352414d6c29b28b0763a1a9456 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 12 Oct 2020 11:11:40 -0700 Subject: [PATCH] Fix bad item case in DatItem --- SabreTools.Library/DatItems/DatItem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs index 8a36cb0f..89cd2ceb 100644 --- a/SabreTools.Library/DatItems/DatItem.cs +++ b/SabreTools.Library/DatItems/DatItem.cs @@ -916,6 +916,10 @@ namespace SabreTools.Library.DatItems { DatItem file = infiles[f]; + // If we somehow have a null item, skip + if (file == null) + continue; + // If we don't have a Dis, Media, or Rom, we skip checking for duplicates if (file.ItemType != ItemType.Disk && file.ItemType != ItemType.Media && file.ItemType != ItemType.Rom) continue;