Enable nullability everywhere

This commit is contained in:
Matt Nadareski
2024-02-28 19:19:50 -05:00
parent 11d024bd16
commit 823a9ca7b7
145 changed files with 1545 additions and 1260 deletions

View File

@@ -78,8 +78,8 @@ namespace SabreTools.Filtering
else if (foundRootFolder)
{
// Get the value and machine name
string value = ir.Section;
string machineName = ir.CurrentLine.Trim();
string? value = ir.Section;
string? machineName = ir.CurrentLine?.Trim();
// If the section is "ROOT_FOLDER", then we use the value "true" instead.
// This is done because some INI files use the name of the file as the
@@ -88,7 +88,8 @@ namespace SabreTools.Filtering
value = "true";
// Add the new mapping
Mappings[machineName] = value;
if (machineName != null && value != null)
Mappings[machineName] = value;
}
}
}