From 6478e1560523b57ffc1d87ea5a1d00c5f99ab8f7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 21 Dec 2017 10:34:09 -0800 Subject: [PATCH] [DatFile] Fix adding from devices --- SabreTools.Library/DatFiles/DatFile.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index 4ba4b284..7cc18bb6 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -2796,6 +2796,12 @@ namespace SabreTools.Library.DatFiles List games = Keys; foreach (string game in games) { + // If the game doesn't have items, we continue + if (this[game] == null || this[game].Count == 0) + { + continue; + } + // If the game has no devices, we continue if (this[game][0].Devices == null || this[game][0].Devices.Count == 0) {