diff --git a/src/WingetCreateCore/Models/Partials/InstallerPartials.cs b/src/WingetCreateCore/Models/Partials/InstallerPartials.cs index fca536a8..ccf46a77 100644 --- a/src/WingetCreateCore/Models/Partials/InstallerPartials.cs +++ b/src/WingetCreateCore/Models/Partials/InstallerPartials.cs @@ -93,10 +93,10 @@ public override bool Equals(object obj) } Dependencies other = (Dependencies)obj; - return this.WindowsFeatures.ToList().SequenceEqual(other.WindowsFeatures) && - this.WindowsLibraries.ToList().SequenceEqual(this.WindowsLibraries) && - this.PackageDependencies.ToList().SequenceEqual(other.PackageDependencies) && - this.ExternalDependencies.ToList().SequenceEqual(other.ExternalDependencies); + return (this.PackageDependencies != null ? this.PackageDependencies.SequenceEqual(other.PackageDependencies) : true) && + (this.WindowsLibraries != null ? this.WindowsLibraries.SequenceEqual(other.WindowsLibraries) : true) && + (this.WindowsFeatures != null ? this.WindowsFeatures.SequenceEqual(other.WindowsFeatures) : true) && + (this.ExternalDependencies != null ? this.ExternalDependencies.SequenceEqual(other.ExternalDependencies) : true); } } @@ -150,7 +150,7 @@ public override bool Equals(object obj) InstallationMetadata other = (InstallationMetadata)obj; return this.DefaultInstallLocation == other.DefaultInstallLocation && - this.Files.ToList().SequenceEqual(other.Files); + (this.Files != null ? this.Files.SequenceEqual(other.Files) : true); } }