Ensure drive is not null for volume labels (fixes #356)

This commit is contained in:
Matt Nadareski
2022-02-02 20:05:15 -08:00
parent 114c7fb38a
commit d3352643fc
2 changed files with 3 additions and 1 deletions

View File

@@ -77,6 +77,7 @@
- Ensure Games pseudo-tag is multi-line
- Add alternate pseudo-tag for Playable Demos
- Make error clearer if something is unsupported in Check
- Ensure drive is not null for volume labels
### 2.2 (2021-12-30)
- Fix Saturn header finding

View File

@@ -104,7 +104,8 @@ namespace MPF.Library
info.TracksAndWriteOffsets.ClrMameProData = null;
// Add the volume label to comments, if possible or necessary
if (drive.GetRedumpSystemFromVolumeLabel() == null
if (drive != null
&& drive.GetRedumpSystemFromVolumeLabel() == null
&& !info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.VolumeLabel))
{
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.VolumeLabel] = drive.VolumeLabel;