Add nullable context to SabreTools.DatFiles

This commit is contained in:
Matt Nadareski
2023-08-10 23:22:14 -04:00
parent 7bb0ba245d
commit a18ee46d5d
57 changed files with 846 additions and 1217 deletions

View File

@@ -92,8 +92,8 @@ namespace SabreTools.DatFiles.Formats
return;
// Create the machine for copying information
string machineName = game.Name.Trim('"');
if (machineName.EndsWith(".zip"))
string? machineName = game.Name?.Trim('"');
if (machineName?.EndsWith(".zip") == true)
machineName = System.IO.Path.GetFileNameWithoutExtension(machineName);
var machine = new Machine { Name = machineName };